JavaScript实现自适应窗口大小的网页_html/css_WEB-ITnose
Login body{ text-align: left; background-color: F6F6F6; background-attachment: fixed; } #imgcenter{ position:relative; height: auto; width:50%; left:20%; top:250px; } #center{ position:relative; height: auto; width:50%; left:20%; top:220px; } #account{ position:relative; height: auto; left:60%; top:-110px; padding:2%; width:50%; } #pwd{ position:relative; height: auto; left:60%; top:-100px; padding:2%; width: 50%; } #login{ position:relative; height: auto; left:60%; top:-95px; padding:1%; width: 25%; } #logo{ padding:3%; width: 50%; height: auto; } #div_forgetpwd{ position:relative; height: 30%; left: 90%; top:-115px; width: 25%; font-size: 1pt; white-space:nowrap; } #div_forgetpwd a{ text-decoration: none; margin: auto; } #div_forgetpwd a:hover{ text-decoration: underline; margin: auto; } .Clew{ position:relative; height: 15px; left:-10%; top:-80%; padding:2% 50%; white-space:nowrap; color: #FFFFD5; font-weight: bold; font-family: century gothic, arial; background: #FCBE47; border-top: 2px solid #db6e3c; border-bottom: 2px solid #db6e3c; } //error clew var userFlag=0; var pwdFlag=0; $().ready(function() { $("form :input").blur(function() { var $parent = $(this).parent(); $parent.find(".clew").remove(); if($(this).is(".username")) { if(this.value=="" || this.value.length var errorMsg = "Please enter your account."; $parent.append(" "+errorMsg+" "); }else userFlag=1; } if($(this).is(".password")) { if(this.value=="" || this.value.length var errorMsg = "Please enter your password."; $parent.append(" "+errorMsg+" "); }else pwdFlag=1; } }).keyup(function() { $(this).triggerHandler("blur"); }).focus(function() { $(this).triggerHandler("blur"); }); }); //提交检验 function validate_form(thisform){ with (thisform){ if (userFlag==0||pwdFlag==0){ username.focus(); return false; } } } -->
查看更多关于JavaScript实现自适应窗口大小的网页_html/css_WEB-ITnose的详细内容...
阅读:47次