码迷,mamicode.com
首页 > 其他好文 > 详细

具有浏览器检测功能的登录页面模板

时间:2014-06-27 19:48:10      阅读:173      评论:0      收藏:0      [点我收藏+]

标签:style   class   blog   code   http   java   

<html>
<head>
<title>石家庄商务礼品</title>
<script language="javascript">
var sUagent=navigator.userAgent;
var fAVersion=parseFloat(navigator.appVersion);
var isOpera=sUagent.indexOf("Opera") > -1;
var isIE=sUagent.indexOf("compatible") > -1 && sUagent.indexOf("MSIE") > -1 && !isOpera;
var isIE4=isIE5=isIE5_5=isIE6=false;
if (isIE){
  var reIE=new RegExp("MSIE (\\d+\\.\\d+);");
  reIE.test(sUagent);
  var getIEVersion=parseFloat(RegExp["$1"]);
  isIE4 = getIEVersion >= 4;
  isIE5 = getIEVersion >= 5;
  isIE5_5 = getIEVersion >= 5.5;
  isIE6 = getIEVersion >= 6;  
}

window.onload=function () {
 if (isIE6){
   document.getElementById("divLogin").style.visibility = "visible";
   document.getElementById("divError").style.visibility = "hidden";
 }
};
</script>
</head>
<body>
<form name="form1">
<div style="border:2px dashed blue; background-color:#cccccc; height:160px; padding:10px">
  <div id="divError" style="position:absolute;left:20px;top:80px">
    此应用程序运行要求如下:
    <ul>
       <li>Internet Explorer 6.0 以上版本</li>
    </ul>
    <noscript>
      <p>您的系统设置不支持JavaScript,请重新设置!</p>
    </noscript>
  </div>
  <div id="divLogin" style="position:absolute; left:200px; top:80px; visibility:hidden">
<table width="450" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="115" background="/jscss/demoimg/201405/lg_top.jpg">&nbsp;</td>
  </tr>
  <tr>
    <td background="/jscss/demoimg/201405/lg_bg.jpg"><table width="300" border="0" align="center" cellpadding="5" cellspacing="0">
          <tr>
            <td height="22" align="right">管理员:</td>
            <td height="22"><input name="txt_name" type="text" class="textbox" id="txt_name" size="18" maxlength="50"></td>
          </tr>
          <tr>
            <td height="22" align="right">密
              码:</td>
            <td height="22"><input name="txt_passwd" type="password" class="textbox" id="txt_passwd" size="19" maxlength="50"></td>
          </tr>
          <tr>
            <td height="22" colspan="2" align="center"><input name="login" type="submit" id="login" value="登 录" class="button" onClick="return Mycheck()">
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
              <input type="reset" name="Submit2" value="重 置" class="button"></td>
          </tr>
    </table></td>
  </tr>
  <tr>
    <td height="59" background="/jscss/demoimg/201405/lg_bot.jpg">&nbsp;</td>
  </tr>
</table>
  </div>
</div>
</form>
</body>
</html>

 

具有浏览器检测功能的登录页面模板,布布扣,bubuko.com

具有浏览器检测功能的登录页面模板

标签:style   class   blog   code   http   java   

原文地址:http://www.cnblogs.com/youtianxia/p/3809581.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!