瀏覽器檢測產生器

來源:互聯網
上載者:User
提示:您可以先修改部分代碼再運行

<title>瀏覽器檢測產生器</title>指令碼說明:第一步:把如下代碼加入<head>地區中:<script language="javascript"><!--function createcodes(entry){line="<script>version=parseInt(navigator.appVersion); browser='OTHER'; if (navigator.appName=='Netscape'){browser='NS'+version;} if (navigator.appName=='Microsoft Internet Explorer'){browser='MSIE'+version;} if (navigator.appVersion.indexOf('MSIE 3')>0) {browser='MSIE3';}";with (document.detectform){ if (MSIE3.value!="") {line=line+"if (browser=='MSIE3') {window.location='"+MSIE3.value+"'}";} if (MSIE4.value!="") {line=line+"if (browser=='MSIE4') {window.location='"+MSIE4.value+"'}";} if (MSIE5.value!="") {line=line+"if (browser=='MSIE5') {window.location='"+MSIE5.value+"'}";} if (NS3.value!="") {line=line+"if (browser=='NS3') {window.location='"+NS3.value+"'}";} if (NS4.value!="") {line=line+"if (browser=='NS4') {window.location='"+NS4.value+"'}";} if (NS5.value!="") {line=line+"if (browser=='NS5') {window.location='"+NS5.value+"'}";} if (OTHER.value!="") {line=line+"if (browser=='OTHER') {window.location='"+OTHER.value+"'}";}}line=line+"</script>"entry.code.value=line;}//--></script>第二步:把如下代碼加入<body>地區中:<TABLE width="100%" border="0" cellspacing="0" cellpadding="0" align="CENTER" valign="TOP"> <tr> <td colspan=3 bgcolor="#6C6C6C"></td> </tr> <tr> <td height="3"></td> <TABLE align="CENTER"> <tr> <td> <form name="detectform"> <table align="center"> <tr> <td></td> <td> <div align="center"> <center> <table border="1" width="100%"> <tr> <td bgcolor="#CCCCDD" colspan="2" width="100%"> <p>請輸入各項串連 </td> </tr> <tr align="center"> <td bgcolor="#FFFFFF" colspan=2 align=left> </td> </tr> <tr align="center"> <td bgcolor="#EEEEFF" colspan="">BROWSER</td> <td bgcolor="#EEEEFF" colspan="">PAGE-URL</td> </tr> <tr align="center"> <td bgcolor="#E4E4E4" colspan=""><font color="#000000" size="2"> MSIE 3 </font></td> <td bgcolor="#E4E4E4" colspan=""> <input type="text" name="MSIE3" size="25" value="http://www.yahoo.com"> </td> </tr> <tr align="center"> <td bgcolor="#E4E4E4" colspan=""><font color="#000000" size="2"> MSIE 4 </font></td> <td bgcolor="#E4E4E4" colspan=""> <input type="text" name="MSIE4" size="25" value="http://www.yahoo.com"> </td> </tr> <tr align="center"> <td bgcolor="#E4E4E4" colspan=""><font color="#000000" size="2"> MSIE 5 </font></td> <td bgcolor="#E4E4E4" colspan=""> <input type="text" name="MSIE5" size="25" value="http://www.yahoo.com"> </td> </tr> <tr align="center"> <td bgcolor="#E4E4E4" colspan=""><font color="#000000" size="2">NETSCAPE 3</font></td> <td bgcolor="#E4E4E4" colspan=""> <input type="text" name="NS3" size="25" value="http://www.yahoo.com"> </td> </tr> <tr align="center"> <td bgcolor="#E4E4E4" colspan=""><font color="#000000" size="2">NETSCAPE 4</font></td> <td bgcolor="#E4E4E4" colspan=""> <input type="text" name="NS4" size="25" value="http://www.yahoo.com"> </td> </tr> <tr align="center"> <td bgcolor="#E4E4E4" colspan=""><font color="#000000" size="2">NETSCAPE 5</font></td> <td bgcolor="#E4E4E4" colspan=""> <input type="text" name="NS5" size="25" value="http://www.yahoo.com"> </td> </tr> <tr align="center"> <td bgcolor="#E4E4E4" colspan=""><font color="#000000" size="2">OTHER BROWSERS</font></td> <td bgcolor="#E4E4E4" colspan=""> <input type="text" name="OTHER" size="25" value="http://www.yahoo.com"> </td> </tr> <tr align="center"> <td colspan="2" bgcolor="#C0C0C0" align="left"> <input type="button" value="代碼產生" name="B1" onClick="createcodes(this.form)" class="pt9"> <br> <input type="reset" value="清除重選" name="B2" class="pt9"> </td> </tr> </table> </center> </div> </td> <td></td> </tr> </table> <table align="center"> <tr> <td> <table border="1" align="center"> <tr> <td bgcolor="#CCCCDD" colspan="2"> <p>產生的程式碼如下: </td> </tr> <tr> <tr> <td bgcolor="#EEEEFF"> <div align="center"> <center> <p>拷貝如下代碼</p> </center> </div> </td> </tr> <tr> <td bgcolor="#EEEEEE"> <div align="center"> <center> <p> <textarea name="code" cols="45" rows="20" wrap="PHYSICAL" class="pt9">選擇上面的項目產生代碼 --------------------------------------------------------------------------------
提示:您可以先修改部分代碼再運行

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.