且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Javascript关闭浏览器属性不起作用

更新时间:2023-01-24 12:14:16

首先,依靠我们为您完成工作对我们而言并不紧迫.别这么说,这很不礼貌.

通常,您正在执行的操作是错误的做法.人们可以根据需要关闭窗口,为什么要为他们做呢?您检查浏览器类型的方式假定地球上有两个浏览器,至少有四个流行的浏览器. window.close()应该是关闭任何窗口所需要的,我不明白其余代码的用途.我唯一能想到的就是您正在制造炸弹之类的东西,这显然是邪恶的.
First of all, it''s not urgent to us that you rely on us to do your job for you. Don''t say that, it''s rude.

What you''re doing is bad practice in general. People can close a window if they want to, why do you want to do it for them ? The way you''re checking your browser types assumes there''s two browsers on earth, there''s at least four popular ones. window.close() should be all you need to close any window, I don''t understand what the rest of this code is for. The only thing I can think of is that you''re creating popunders or something, which is clearly evil.