gpt4 book ai didi

jquery - 在 Jquery 弹出窗口中显示加载微调器

转载 作者:行者123 更新时间:2023-12-01 08:22:47 24 4
gpt4 key购买 nike

我正在使用 jquery 弹出窗口在 Iframe 内加载外部页面。

现在我想显示加载微调器或加载栏图像并在其工作时隐藏外部页面/iframe,因此用户只能看到微调器。

可以吗,如果可以的话,请帮助我。

这是代码

    <script type="text/javascript">
$(document).ready(function () {

$("a#em4c").bind("click", function () {
$("#popup2").bPopup({ content: 'iframe', contentContainer: '#pContent', loadUrl: "http://site.com" });
return false
});

});
</script>

html部分

<p><a id="em4c"><strong>POP ME</strong>: Simple jquery popup that loads a page   inside an iframe</a></div>

谢谢

最佳答案

这可能对你有帮助

<form>
Your input elements
</form>
<div id="dialog1" title="Waiting" style="display:none">
<img src="/spinning.gif" border="0" align="left" hspace="12"/> Place all your text here
<iframe id="iframe1" src="" width="100%" height="100%"></iframe>
Place all your Text
</div>

将其写入 document.ready

$("#dialog1").dialog({
autoOpen: false,
height: 150,
weight: 50,
resizable: false,
modal: true
});

//单击元素时您可以这样做

$("a#em4c").bind("click", function () {
$('#dialog1').removeAttr('style');
$('#dialog1').dialog('open');
var url ="some.php";
$('#iframe1').attr('src',url);
})

单击该元素后,它将打开旋转图像,然后在以下位置打开 some.phpiframe。这是你所期待的吗?

关于jquery - 在 Jquery 弹出窗口中显示加载微调器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6268939/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com