实例代码“Ctrl+/”提示“F11/ESC”全屏 返回 格式化 恢复 运行
x
 
1
<!DOCTYPE html>
2
<html>
3
<body>
4
5
<form id="frm1" action="demo-form.php">
6
First name: <input type="text" name="fname" value="Donald"><br>
7
Last name: <input type="text" name="lname" value="Duck"><br>
8
<input type="submit" value="Submit">
9
</form>
10
11
<p>The number of elements in "frm1" are:
12
<script>
13
document.write(document.getElementById("frm1").length);
14
</script>
15
</p>
16
17
</body>
18
</html>
19