1
我正在使用ASP Classic腳本的舊系統上工作。如何使用JQuery使這個舊的JavaScript/ASP Classic代碼(乾淨)不顯眼?
在ASP經典文件我有渲染表的一部分的代碼段:
<td nowrap align="center">
<%if iBidCount > 0 then %>
<a class="number-of-bids" onClick="showBidHistory(<% = oRSResults("ListedPlatesId") %>, this);" title="Click to show bid history"><%= iBidCount %></a>
<% else %><span class="no-bids">0</span>
<%end if%>
</td>
中的JavaScript我有onClick事件如下:
function fetchBidHistory (pListedPlatesId) {
var d = new Date();
var t = d.getTime();
$.get('/auction/includes/new-bidhistory.asp?lplateid=' + pListedPlatesId + "&xx=" + t,
function(data){
$('#BidHistory').html(data).animate({opacity:1.0}, 400);
});
}
function showBidHistory(pListedPlatesId, pObj) {
var lyrBidHistory = $('#BidHistory');
//Populate the DIV
fetchBidHistory (pListedPlatesId);
}
,你可以看到我已經設法實現了一些JQuery。我的目標是儘可能使JavaScript不顯眼。另外我無法在DIV#BidHistory
消失後出現問題嗎?
有沒有辦法做到這一點?有任何想法嗎?
任何幫助,非常感謝。謝謝
不用擔心我解決了它! – Nasir 2010-11-23 16:32:35