公益手抄报图片大全:如何直接提交表单
请问高手,应该如何处理。谢谢!
<form action="" method="post" name="form1" target="_parent">
<select name="jumppage">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
</select>
</form>
代码要尽量简洁:
<form action="" method="post" name="form1" target="_parent">
<select name="jumppage" onchange='action = "index.asp?pagenum=" + this.value;submit()'>
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
</select>
</form>
David_King代码写错了~~~~还有由于submit()是在表单内操作,所以不用再加上form这个属性
可以用 Session 来做。
</select onchenage=form.submit()>
可以这样写:
<SCRIPT LANGUAGE="JavaScript">
<!--
function up(){
form1.action = "index.asp?pagenum=" + form1.jump.value;
form1.submit();
}
//-->
</SCRIPT>
<form action="" method="post" name="form1" target="_parent">
<select name="jump" onchange="up();">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="5">5</option>
<option value="6">6</option>
</select>
</form>