实例代码“Ctrl+/”提示“F11/ESC”全屏 返回 格式化 恢复 运行
x
 
1
<!DOCTYPE html>
2
<html>
3
<body>
4
5
<form id="form1">
6
<button id="button1" type="button">Click me!</button>
7
</form>
8
9
<p>The id of the form containing the button is: 
10
<script>
11
document.write(document.getElementById("button1").form.id);
12
</script></p>
13
14
</body>
15
</html>