<script type="text/javascript" src="http://code.jquery.com/jquery-1.10.2.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
//alert($("#username" ).val());
$("p").click(function(){
$(this).hide();
});
$("#username").blur(function(){
$("p").html("dddddddddd");
});
});
// "/^[\w-]+(\.[\w-]+)*@([\w-]+\.)+[a-zA-Z]+$/"
//1.不能在前后加/;
//2.不能用\w \d.
var email = "[email protected]";
var email_patten = new RegExp("^[a-z|A-Z|0-9]+\-?\_?[a-z|A-Z|0-9]+@[a-z|A-Z|0-9]+\.?[a-z|A-Z|0-9]+\.?[a-z|A-Z|0-9]+[a-z|A-Z]+$");
if(email_patten.test(email)){
document.write("email匹配!");
}
else{
document.write("email不匹配了!");
}
</script>