hello.html:所有提交的方式都是提交到这位置
<h1>提交表单到这里</h1>
###### submit.html:submit提交表单,这种提交表单的方法是最常用的。
<html>
<head>
<title>submit提交表单</title>
</head>
<form action="hello.html">
<input type="text" name="username"><br/>
<input type="submit" value="提交" >
</form>
</html>
###### button.html:利用js来进行提交表单,总体来说,与submit的区别不是很大,就如同绕了一个弯弯,到submit
<!DOCTYPE html>
<html>
<head>
<title>button提交表单</title>
<style type="text/css">
</style>
</head>
<body>
<form id="form1">
<input type="text" name="username"><br/>
<input type="button" value="提交" onclick="form1();">
</form>
</body>
<script type="text/javascript">
function form1(){
//实现提交的方法
var form1 = document.getElementById('form1');
//设置action
form1.action = "hello.html";
//提交form表单
form1.submit();
}
</script>
</html>
herf.html:以超链接形式进行提交
<!DOCTYPE html>
<html>
<head>
<title>超链接提交表单</title>
<style type="text/css">
</style>
</head>
<body>
<!-- ?的作用就是后边接的参数,参数后边的就是值 -->
<a href="hello.html?username=123456">点击我进行提交</a>
</body>
</html>