我有一个 jquery 函数,我需要在 Iframe 中打开网站后调用它。
我正在尝试在 Iframe 中打开一个网络链接,打开它后我需要调用以下函数。
那么我该怎么做呢?
这是我的功能:
<script type="text/javascript">
$(document).ready(function(){
$("#<%=Button1.ClientID%>").click(function (event) {
$('#<%=TextBox1.ClientID%>').change(function () {
$('#various3').attr('href', $(this).val());
});
$("#<%=Button2.ClientID%>").click();
});
})
function showStickySuccessToast() {
$().toastmessage('showToast', {
text: 'Finished Processing!',
sticky: false,
position: 'middle-center',
type: 'success',
closeText: '',
close: function () {
}
});
}
</script>
这是我在 IFrame 中打开链接的按钮:
<a id="various3" href="#"><asp:Button ID="Button1"
runat="server" Text="Button" OnClientClick="Button2_Click"/></a>
实际上这是我拥有的简单页面:
And this is the message
您可以在 JavaScript 中使用普通的 setTimeout 方法。
ie...
setTimeout( function(){
// Do something after 1 second
} , 1000 );
在您的示例中,您可能想要使用showStickySuccessToast
直接地。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)