我有以下代码。
<html>
<body>
<div>
<iframe>
<html>
<body>
content
</body>
</html>
</iframe>
</div>
</body>
</html>
我想显示等待光标,直到 iframe 的内容完全加载。 我可以控制这两个 html。
最佳答案
您可以编写一个简单的函数来更改正文(或其他内容)的光标:
$('body').css('cursor', 'pointer');
虽然我不确定您是否可以让 iframe onload
在所有浏览器上正常工作。
$("#iFrameId").load(function (){
// do something once the iframe is loaded (disable busy cursor, etc)
});
检查以下 SO 问题 => How do I fire an event when a iframe has finished loading in jQuery?
关于javascript - 如何在 iframe 完全加载之前显示繁忙的光标?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7731142/