30分钟后关闭浏览器 [英] close browser after 30 minutes

查看:131
本文介绍了30分钟后关闭浏览器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



如果我单击提交"按钮,浏览器(www.google.com)已打开,则此浏览器仅在自动关闭浏览器后30分钟处于打开状态,因此开始时间(例如:11.00)和结束时间(例如:12.00)存储我的数据库

我的要求是,在30分钟后使用c#.ne wepapplication使用asp.net关闭浏览器后如何检查条件.

Hi,

if i click the submit button the browser(www.google.com) is open this browser is open only 30 minutes after automatically close the browser so the start time(ex:11.00)and end time (ex:12.00) store my database

What my requirments is how check the condition after 30 mintes close the browser using asp.net with c#.ne wepapplication.

推荐答案

真的,您需要使用Javascript进行此操作-AFAIK无法从服务器执行此操作(无法保证您的应用程序甚至在三十分钟后运行).
而且,我怀疑无论您使用什么,它都不能在所有浏览器中使用-IIRC Firefox不会在没有用户干预的情况下让Javascript关闭浏览器窗口.

用Java语言做起来很容易:
http://www.java-scripts.net/javascripts/Auto-Browser-Closer.phtml [ ^ ]
Really, you need to do this in Javascript - AFAIK there is no way to do this from the server (there is no guarantee that you app is even running thirty minutes later).
And, I suspect that whatever you, it won''t work in all browsers - IIRC Firefox won''t let Javascript close teh browser window without user intervention.

Doing it in Javascript is easy:
http://www.java-scripts.net/javascripts/Auto-Browser-Closer.phtml[^]


尝试一下
在.aspx页面中
车身标签
onLoad ="setTimeout(window.close,30000);"





window.setTimeout(window.close,30000);
try this
in .aspx page
body tag
onLoad="setTimeout(window.close, 30000);"

or



window.setTimeout( window.close, 30000 );


这篇关于30分钟后关闭浏览器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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