答案 0 :(得分:1)
这样的事情:
<script type="text/javascript">
$(window).load(function() {
$(".hoja").fadeOut("slow");
})
</script>
答案 1 :(得分:1)
在//html
<body onload='hideLoader()'>
<div id='loader' class="hoja">Loading...</div>
</body>
//js
window.hideLoader = function(){
var loader = document.getElementById('loader');
loader.style.display='none';
}
上的javascript中添加DECLARE @curEmployee CURSOR;
DECLARE @iEmpID BigINT
DECLARE @vEmployeeName Varchar(50), @EmployeeContact Varchar(50)
BEGIN
SET @curEmployee = CURSOR LOCAL READ_ONLY FAST_FORWARD FOR
select EmployeeID,EmployeeName, EmployeeContact from dbo.Employee
OPEN @curEmployee
FETCH NEXT FROM @curEmployee
INTO @iEmpID, @vEmployeeName, @EmployeeContact
WHILE @@FETCH_STATUS = 0
BEGIN
PRINT Cast (@iEmpID as Varchar(10)) + ' - ' + @vEmployeeName + ' - ' + @EmployeeContact
-- Here Write the code based on @iEmpID
FETCH NEXT FROM @curEmployee
INTO @iEmpID, @vEmployeeName, @EmployeeContact
END
CLOSE @curEmployee
DEALLOCATE @curEmployee
END
函数,这将执行隐藏加载程序的逻辑
Cross Reference and Model Information
小提琴:http://jsfiddle.net/33zch/61/
使用setTimeout显示效果:http://jsfiddle.net/33zch/63/(感谢Moob)
答案 2 :(得分:0)
试试这个
window.onload = function(){
document.getElementsByClassName('hoja')[0].style.opacity = '0';
}
或强>
window.onload = function(){
document.getElementsByClassName('hoja')[0].style.display = 'none';
}
正在使用 JSFiddle