window.onload = function () {
var spread1 = document.getElementById("FpSpread1");
if (document.all) {
// IE
if (spread1.addEventListener) {
// IE9
spread1.addEventListener("CallBackStart", CallBackStart, false);
spread1.addEventListener("CallBackStopped", CallBackStopped, false);
} else {
// Other versions of IE and IE9 quirks mode (no doctype set)
spread1.onCallBackStart = CallBackStart;
spread1.onCallBackStopped = CallBackStopped;
}
}
else {
// Firefox
spread1.addEventListener("CallBackStart", CallBackStart, false);
spread1.addEventListener("CallBackStopped", CallBackStopped, false);
}
}
function CallBackStart(event) {
if (event == null) event = window.event;
document.getElementById("background").style.display = "block";
document.getElementById("progressBar").style.display = "block";
//alert("start"); 没有注释显示正常?
}
function CallBackStopped() {
document.getElementById("background").style.display = "none";
document.getElementById("progressBar").style.display = "none"
}
运行 spread.CallBack事件
但是在加载完成后显示加载提示的div马上又隐藏了加载提示的div?应该是加载前显示加载提示的DIV,加载后隐藏加载提示的DIV,怎么实现?
如果没有注释 //alert("start");显示正常的? |
|