1.调用alert()方法出现两次相同的提示信息,如果有多个alert()调用,会在开头出现一次,结尾出现一次。
<!DOCTYPE html PUBLIC "-//W3C//DTD XH TML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml&...
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<script language="javascript">
function RegEx()
{
1 2 3 4 5 6 |
|
}
function checkName()
{
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
|
}
function checkAge()
{
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
|
}
function checkId()
{
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
|
}
function checkEmail()
{
1 2 3 4 5 6 7 8 9 |
|
}
else
1 2 3 4 |
|
return true;
}
</script>
</head>
<body>
昵称: | <label for="name"></label> <input type="text" name="name" id="UserName" /> |
年龄: | <label for="age"></label> <input type="text" name="age" id="UserAge" /> |
身份证: | <label for="userId"></label> <input type="text" name="userId" id="UserId" /> |
邮箱: | <label for="Email"></label> <input type="text" name="Email" id="UserEmail" /> |
<p align="center"> <input type="submit" name="confirm" id="confirm" value="提交" onclick="RegEx()" /> </p> |
</body>
</html>
PHPz2017-04-11 13:34:13
前面已经执行一次,if中又执行了一次。
1 2 3 4 5 6 7 8 9 |
|