- 表单提交方式
<form>
.....
<input type="submit"/>
</form>
<form id = "form1">
<input type = "text" name = "username"/>
<br/>
<input type = "button: value= "提交" onclick="form():"/>
</form>
</body>
<script type= "text/javascript">
function form1(){
//获取form
var form1 = document.getElememtById("form1");
//设置action
form1.action = "hello.html";
//提交form表单
form1.submit();
}
</script>
<a href="hello.html?username="123456">使用超链接提交</a>
<input type="text" id= "id1" name="text1" value="please input" onfocus="focus1();" onblur="blur1();"/>
<script type = "text/javascript">
function focus1(){
var input1 = document.getElementById("id1");
input1.value= "";
}function blur1(){
var input1 = document.getElementById("id1");
input1.value= "please input";
}
</script>