您好我想知道是否有任何技术可以通过它来控制使用jquery的加载图像可以长时间显示的时间。例如:在jquery中显示加载图像很长时间
$('#ajax').html('<img src="ajax.gif"/>');
$('#iframe').load('file.php');
现在我想知道有什么方法可以通过它显示ajax.gif指定的时间?请告诉我。
您好我想知道是否有任何技术可以通过它来控制使用jquery的加载图像可以长时间显示的时间。例如:在jquery中显示加载图像很长时间
$('#ajax').html('<img src="ajax.gif"/>');
$('#iframe').load('file.php');
现在我想知道有什么方法可以通过它显示ajax.gif指定的时间?请告诉我。
尝试
var loader = '<img id="loader" src="http://tools.patentcalls.com/images/spinner.gif"/>';
jQuery(document).ready(function() {
setTimeout(function() {
jQuery('#ajax').html(loader);
}, 1000);
jQuery('#iframe').load('file.php');
});
阅读'setTimeOut':https://developer.mozilla.org/en/DOM/window.setTimeout – diEcho 2011-05-24 05:50:49