使用Javascript - 关闭确认消息,如果没有来自用户的响应 [英] Javascript - Closing confirmation message if no response from user
问题描述
我有asp.net 2.0网站,我在其中通过确认消息框显示会话超时,要求用户选择确定或取消。
I have got asp.net 2.0 website, in which I display session timeout through confirm message box, asking user to select ok or cancel.
问题:如果用户不提供任何输入(假设他的桌面被锁定,他是出去吃午饭) - 那么我怎么可以关闭此确认消息并显示另一个弹出式窗口或重新driect到登录页面
Problem: if user doesn't provide any input (assuming his desktop is locked and he is out for lunch) - then how can I close this confirmation message and display another pop-up or re-driect to login page
问候
推荐答案
如果您使用的是本机浏览器确认框,你不能排除的是,用户将需要这样做。如果你创建你自己的,那么你可以使用的setTimeout 辞退一定量的时间之后
If you are using the native browser confirmation box you cannot dismiss that, the user would need to do so. If you create your own, then you can use setTimeout to dismiss after a certain amount of time
这篇关于使用Javascript - 关闭确认消息,如果没有来自用户的响应的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!