<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>正则表达式综合练习</title>
<script src="jquery-1.7.2.min.js"></script>
</head>
<body>
<center>
<h1>多种信息格式验证</h1>
<hr>
<form name="myform">
<table>
<tr>
<td style="width: 120px; text-align: right; padding-right: 5px;"
class="style2">
检 查 结 果:
</td>
<td >
<input type="text" id="result" name="inspect" style="width: 140px; "/>
<span id="xx6" style="color:red;"></span>
</td>
</tr>
<tr>
<td colspan="4" style="text-align: center; padding-right: 10px;">
<input type="submit" value="保存" οnclick="return click0();"/>
<input type="button" id="btnExit" value="关闭"/>
</td>
</tr>
</table>
</form>
</center>
<script type="text/javascript">
function click0()
{
alert("dd"+document.getElementById("result").value);
if(document.getElementById("result").value=="")
{
alert("ww");
//alert("result="+$("#result").val());
//document.getElementById("xx6").html("*");
$("#xx6").html("*");
return false;
}
}
</script>
</body>
</html>
html校验2
最新推荐文章于 2021-07-15 14:15:45 发布