xxxxxxxxxx
<html>
<head>
<meta charset="utf-8">
<title>W3Cschool(w3cschool.cn)</title>
</head>
<head>
<script>
function formSubmit()
{
document.forms["myForm"].submit();
}
</script>
</head>
<body>
<form name="myForm" action="/statics/demosource/demo-form.php" method="get">
First name: <input type="text" name="fname"><br>
Last name: <input type="text" name="lname"><br><br>
<input type="button" onclick="formSubmit()" value="发送表单数据!">
</form>
<p>注意,头部的 JavaScript 部分使用了表单的名称来提交指定的表单。</p>
</body>
</html>