当前位置:编程学习 > JS >>

js 弹出登录窗口

js 弹出登录窗口原创,转载请注明:www.226511.cn

<script language='javascript'>
<!--
function opendb()

 

 var myAlert = document.getElementById("alert");

 

  myAlert.style.display = "block";

 

  myAlert.style.position = "absolute";

 

  myAlert.style.top = "50%";

 

  myAlert.style.left = "50%";

 

  myAlert.style.marginTop = "-75px";

 

  myAlert.style.marginLeft = "-150px";

 

  mybg = document.createElement("div");

 

  mybg.setAttribute("id","mybg");

 

  mybg.style.background = "#000";

 

  mybg.style.width = "100%";

 

  mybg.style.height = "100%";

 

  mybg.style.position = "absolute";

 

  mybg.style.top = "0";

 

  mybg.style.left = "0";

 

  mybg.style.zIndex = "500";

 

  mybg.style.opacity = "0.3";

 

  mybg.style.filter = "Alpha(opacity=80)";

 

  document.body.appendChild(mybg); 

 

  document.body.style.overflow = "hidden";

 

}

 

 function mClose()

 

 {

 

  var mybg=document.getElementById("mybg"); 

 

  var myAlert = document.getElementById("alert"); 

 

  myAlert.style.display = "none";

 

  mybg.style.display = "none";

 

 } 

 

-->

 

</script>

 

<div id="alert"><form name="form1" method="post" action="../re_login.php">

 

 <h4><span id='l'>登录</span><label></label><div id="l"><a href="#"  class="lin" onClick="mClose();">关 闭</a></div></h4>

 

 <p><label>用户名:</label><input type="text" class="input1"  name='uid' onmouseover="this.style.border='1px solid #f60'" onfoucs="this.style.border='1px solid #f60'" onblur="this.style.border='1px solid #ccc'" /></p>

 

 <p><label>密 码:</label><input type="password"  type="password" class="input1"  name="pwd" onmouseover="this.style.border='1px solid #f60'" onfoucs="this.style.border='1px solid #f60'" onblur="this.style.border='1px solid #ccc'" /></p>

 

 <p><label>验证码:</label><input type='text' class='input1' size="40" name='ver' onmouseover="this.style.border='1px solid #f60'" onfoucs="this.style.border='1px solid #f60'" onblur="this.style.border='1px solid #ccc'"><span><img src="inc/ver.php" onClick="this.src='inc/ver.php';" /></span></p>

 

 <p><input name="Submit" type="submit" class='sub' value="登 录"><input type="reset" value="重置" class="sub" /></p>

 

 </form>

 

</div>

补充:网页制作,js教程 
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,