我有一个Rails网络应用程序(在线考试系统).我在检查界面中使用JavaScript禁用了右键单击,选择,复制等.所以,我希望我的应用程序检测是否在界面启动时启用了JavaScript.我通过使用<noscript>标签检查了如下.
<noscript>
<meta http-equiv="refresh" content="5">
<div id="noscript_message" style="color: white; background-color: red;">
It is detected that Javascript is turned off in your web brower. Please turn it on to load the page correctly. For more reference about how to turn it on, please refer <a href="http://www.enable-javascript.com/" target="_blank">
instructions how to enable JavaScript in your web browser</a>.
</div>
</noscript>
Run Code Online (Sandbox Code Playgroud)
但我只能检测并显示一条消息作为警告.我的意图是不加载该页面并仅显示警告消息.如何实现?
谢谢 :)-