Hi Dof
我這邊問個問題:Spread控件的Js的事件:onDataChanged.
為什么在IE中會重復執行兩次,而在火狐和Chrome瀏覽器中只執行一次。其實正常邏輯是只執行一次,而在IE中會執行兩次。
請問,這個問題怎么解決?麻煩幫忙緊急看下,等著急用。謝謝!
window.onload = function () {
var spread1 = document.getElementById("<%=FpSpread1.ClientID %>");
if (document.all) {
// IE
if (spread1.addEventListener) {
// IE9
spread1.addEventListener("DataChanged", FpSpread1_DataChanged, false);
}
else {
// Other versions of IE and IE9 quirks mode (no doctype set)
spread1.onDataChanged = FpSpread1_DataChanged;
}
}
else {
// Firefox
spread1.addEventListener("DataChanged", FpSpread1_DataChanged, false);
}
}
function FpSpread1_DataChanged(event) {
alert("OK");
return false;
} |
|