实例代码“Ctrl+/”提示“F11/ESC”全屏 返回 格式化 恢复 运行
x
 
1
<!DOCTYPE html>
2
<html>
3
<head>
4
<script>
5
function formSubmit()
6
{
7
document.getElementById("frm1").submit();
8
}
9
</script>
10
</head>
11
<body>
12
13
<p>Enter some text in the fields below, then press the "Submit form" button to submit the form.</p>
14
15
<form id="frm1" action="form_action.asp">
16
First name: <input type="text" name="fname"><br>
17
Last name: <input type="text" name="lname"><br><br>
18
<input type="button" onclick="formSubmit()" value="Submit form">
19
</form>
20
21
</body>
22
</html>