<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<style type="text/css">
body {text-align:center;}
form {margin-left:50px}
form label {display:block;margin-bottom:5px;}
.hover {background:#cfc}
.focus {border-color:#c00;background-color:#fff;}
label.submit {text-align:right;}
legend {font-weight:700}
</style>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript">
$(document).ready(function() {
if ($.browser.msie){
$("input[@type=text],textarea").hover(function(){
$(this).addClass("hover");
},function(){
$(this).removeClass("hover");
});
$("input[@type!=radio],@type!=checkbox],textarea").focus(function(){
$(this).addClass("focus");
});
$("input[@type!=radio],@type!=checkbox],textarea").blur(function(){
$(this).removeClass("focus");
});
}
});
</script>
</head><body><fieldset id="ologin"><legend>登录界面</legend>
<form>
<label for="uname">姓名:<input name="uname" id="uname" type="text"></label>
<label for="upws">密码:<input name="upws" id="upws" type="text"></label>
<label class="submit"><input value="登录" type="submit"> <input value="取消" type="reset"></label>
</form>
</fieldset>
</body></html>
jquery 表单
最新推荐文章于 2022-07-30 17:29:30 发布