<html>
<head>
<script>
function _add()
{
var a=prompt("请输入您的名字进行验证:","");
if(a=="lewanzi")
alert("你的输入正确!");
else
alert("你的输入不正确!");
}
</script>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>新建网页 1</title>
</head>
<body>
<form>
<input type="button" value="用户名" οnclick="_add()">
</form>
</body>
</html>
<head>
<script>
function _add()
{
var a=prompt("请输入您的名字进行验证:","");
if(a=="lewanzi")
alert("你的输入正确!");
else
alert("你的输入不正确!");
}
</script>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>新建网页 1</title>
</head>
<body>
<form>
<input type="button" value="用户名" οnclick="_add()">
</form>
</body>
</html>