禁用浏览器新标签页按钮按钮、浏览器、标签

2023-09-10 19:27:02 作者:人比黄花瘦

其实我一直在创造使用PHP的在线考试模块。但要求是什么,我想禁用打开新的标签,以便正在网上考试谁的用户将无法打开新窗口,直到考试是finished..so用户不能打开新窗口,以避免被欺骗谷歌搜索

Actually i have been creating online examination module using php. but what the requirement is i want to disable opening new tab so the users who are taking online examination will not be able to open new window untill the exam is finished..so that users cannot open new window to avoid cheating by googling

推荐答案

最好的办法是打开一个弹出窗口,并加载测试在弹出。

Best way would be to open a pop up window and load the test in that pop up.

使用的window.open(),然后你可以提供额外的参数。 这里提供

Use window.open() and then you can provide additional parameters. as provided here

这样,用户将不能够在该弹出打开新的标签页。另外你可以做的就是密切从中新的弹出窗口已经打开的标签

That way user will not able to open new tab on that pop up. Also what you can do is close the tab from which new pop up has been opened