我有以下腳本將一些東西發佈到服務器,並將json結果寫回用戶瀏覽器。它並不如預期:(如何讓jQuery在所有瀏覽器中都一樣?
$(document).ready(function() {
$('#productForm').ajaxForm({
dataType: 'json',
success: function (response) {
var tmp = '<tr>';
tmp += '<td><a href="/Invoice/DeleteProduct/' + response.Id +'>Kasta</a></td>';
tmp += '<td>' + response.Quantity + '</td>';
tmp += '<td>' + response.UnitPrice + '</td>';
tmp += '<td>' + response.ProfitRate + '</td>';
tmp += '<td>' + response.Description + '</td>';
tmp += '<td>' + response.Total + '</td>';
tmp += '</tr>';
$('#productsBody').append(tmp);
alternateRows();
},
clearForm: true,
resetForm: true,
timeout: 3000
});
});
在Firefox中一切都很好,在Chrome瀏覽器中的新行不顯示在所有,但我的一些微小的區域改變顏色的工作。
Internet Explorer 8中我沒有得到該鏈接,它把該鏈接爲普通文本。我會去更多的尖叫和一些希望有人能告訴我爲什麼,當我尖叫回來不起作用。
哎喲,那些有時候是最壞的:) – 2010-08-04 20:51:36
好吧,這可能就是它! – 2010-08-04 20:52:03
發生這種事時我討厭它! – Buggabill 2010-08-04 20:52:36