![]() |
#2
Alleniv2011-08-10 16:59
|

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>1</title>
<script src="js/jquery.js" type="text/javascript"></script>
<body>
<form id="form2" onsubmit="return ok();">
<input name="nane" type="text" id="name" />
<input type="submit" name="button" value="提交" id="button1" />
</form>
</body>
</html>
<script>
function ok()
{
$("#button1").click(function(){
if ($("#name").val() == "1"){alert("yy");}
//if ($("#name").val() != "1"){alert("nn")};
});
return false;
}
</script>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>1</title>
<script src="js/jquery.js" type="text/javascript"></script>
<body>
<form id="form2" onsubmit="return ok();">
<input name="nane" type="text" id="name" />
<input type="submit" name="button" value="提交" id="button1" />
</form>
</body>
</html>
<script>
function ok()
{
$("#button1").click(function(){
if ($("#name").val() == "1"){alert("yy");}
//if ($("#name").val() != "1"){alert("nn")};
});
return false;
}
</script>