檢測瀏覽器是否支持cookie功能
<script>if(navigator.cookieEnabled){document.write("你的瀏覽器支持cookie功能!");}else{document.write("你的瀏覽器不支持cookie!");}</script>
檢查瀏覽器是否已經啟用Java支持功能
<script type="text/javascript">document.write("navigator對象的方法"+"<br>");if(navigator.javaEnabled()){document.write("瀏覽器支持并啟用了Java的方法!"); //提示用戶支持Java方法}else{document.write("瀏覽器不支持或沒有啟用Java的方法!"); //提示用戶不支持Java方法}</script>
當前瀏覽器的信息
<script type="text/javascript">with(document){write("你的瀏覽器信息:<ol>");write("<li>代碼:"+navigator.appCodeName);write("<li>名稱:"+navigator.appName);write("<li>版本:"+navigator.appVersion);write("<li>語言:"+navigator.language);write("<li>編譯平臺:"+navigator.platform);write("<li>用戶表頭:"+navigator.userAgent);}</script>
以上所述就是本文的全部內容了,希望大家能夠喜歡。
新聞熱點
疑難解答