在页面加载时显示弹出窗口 [英] displaying pop up at page load

查看:86
本文介绍了在页面加载时显示弹出窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我需要在页面加载页面超过10秒时显示弹出窗口。它是一个使用C#的Asp.net应用程序。我们有两台服务器。当用户点击一个服务器上的链接时,将在后端从另一个服务器获取所需的详细信息,然后它将显示包含文档的IE。当IE页面花费更多时间加载页面时,我需要显示弹出窗口。



谢谢。

Hi,

I need to display a popup when page takes more than 10 seconds to load a page. It is a Asp.net application using C#.We have two servers. when user clicks on a link on one server required details will be taken form another server at backend and then it will display a IE which contains a document. I need to display a pop up when the IE page is taking more time to load a page.

Thanks.

推荐答案

在代码下方使用但10秒后不显示弹出窗口。







setTimeout(fnShowPopup,10000);

函数fnShowPopup(){

var answer = confirm(打开此文档可能需要一些时间。如果要打开,请单击是原始格式的docuemnt或点击取消继续查看文件)

if(answer)

alert(Hello World)

}





< script>
Used below code but it is not displaying popup after 10 seconds.



setTimeout(fnShowPopup, 10000);
function fnShowPopup(){
var answer = confirm(It may take few time to open this document. Click YES if you want to open the docuemnt in native format or click on CANCEL to continue viewing the document)
if (answer)
alert(Hello World)
}


<script>


这篇关于在页面加载时显示弹出窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆