本文介紹了檢查Javascript是否啟用的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!
問題描述
有沒有辦法檢查瀏覽器是否啟用或支持Javascript?如果不支持,我想將用戶重定向到用戶友好的錯誤頁面.
Is there a way to check whether Javascript is enabled or supported by the browser? If it's not supported, I would like to redirect the user to a user-friendly error page.
我使用 jQuery 和 PHP Zend 框架.
I am using jQuery and the PHP Zend Framework.
推薦答案
<noscript><meta http-equiv="refresh" content="1;url=error.html"></noscript>
如果腳本被禁用,這將重定向到錯誤頁面.只需將 error.html
替換為錯誤頁面的 URL.
This will redirect to an error page if script is disabled. Just replace error.html
with the URL of your error page.
這篇關于檢查Javascript是否啟用的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!
【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!