Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想知道在禁用 JavaScript 时是否有任何方法可以通过按下网页内的按钮来关闭选项卡/浏览器。
我可能认为http响应中有一些标头(请求/响应)参数可以在服务器端设置,浏览器可以读取这些参数并关闭选项卡/浏览器?
如果这有任何意义,请回复。
不,这是不可能的。只有window.close()浏览器可能会或可能不会遵循的Javascript。
window.close()
不,我不知道。Javascript 几乎是要求浏览器关闭选项卡/窗口的唯一方法。