本文介紹了檢查Javascript是否啟用的處理方法,對(duì)大家解決問題具有一定的參考價(jià)值,需要的朋友們下面隨著小編來(lái)一起學(xué)習(xí)吧!
問題描述
有沒有辦法檢查瀏覽器是否啟用或支持Javascript?如果不支持,我想將用戶重定向到用戶友好的錯(cuò)誤頁(yè)面.
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>
如果腳本被禁用,這將重定向到錯(cuò)誤頁(yè)面.只需將 error.html
替換為錯(cuò)誤頁(yè)面的 URL.
This will redirect to an error page if script is disabled. Just replace error.html
with the URL of your error page.
這篇關(guān)于檢查Javascript是否啟用的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!
【網(wǎng)站聲明】本站部分內(nèi)容來(lái)源于互聯(lián)網(wǎng),旨在幫助大家更快的解決問題,如果有圖片或者內(nèi)容侵犯了您的權(quán)益,請(qǐng)聯(lián)系我們刪除處理,感謝您的支持!