<form action="" type="post" onsubmit="return validte()">
<div class="regist-top">
<ul class="regist-form">
<li><label for="">姓 名</label><input type="text" name="username" id="username">
<span class="error_info" id="name_error"></span>
</li>
<li><label for="">学 校</label><input type="text" name="school" id="school">
<span class="error_info" id="school_error"></span>
</li>
<li><label for="">手 机</label><input type="text" name="phonenumber" id="phonenumber">
<span class="error_info" id="phone_error"></span>
</li>
<li class="last">
<label for="">QQ</label><input type="text" name="qq" id="qq">
<span class="error_info" id="qq_error"></span>
</li>
</ul>
</div>
<div class="tc"><input type="submit" class="submit" value="离大使就差一步了,赶紧提交吧!"></div>
</form>
$("#username").on({
"blur":function(){username();},
"focus":function(){$("#name_error").text("");}
});
$("#school").on({
"blur":function(){school();},
"focus":function(){$("#school_error").text("");}
});
$("#phonenumber").on({
"blur":function(){phonenumber();},
"focus":function(){$("#phone_error").text("");}
});
$("#qq").on({
"blur":function(){ qq();},
"focus":function(){ $("#qq_error").text("");}
});
form表单提交 type="submit"