|
藍森林 http://www.lslnet.com 2006年8月25日 8:28
請教一個form提交的問題
[code]<script>
function testsend(id){
form1.action.href=id+".asp";
form1.submit();
}
</script>
<form id=form1 action="" method="post">
<input . . .
</form>
<a href="#" onclick="testsend('1')">提交一</a>
<a href="#" onclick="testsend('2')">提交二</a>
<a href="#" onclick="testsend('3')">提交三</a>
<a href="#" onclick="testsend('4')">提交四</a>
[/code]
我所想的事能夠通過店擊不同提交,提交到不同的頁面裡面去。但是上面的代碼好像有問題...請達人指點。 |
<script>
function testForm(id){
document.form1.action=id+'.asp';
document.form1.submit();
}
</script>
<form name=form1>
<input name=a> . . .
</form>
<a href="javascript:testForm('a')">提交二</a>
|
form1.action=id+".asp";
|
ok~謝謝樓上的二位了~ |
小妹順便想問一下
我的form中的下拉表單,中加上鏈接怎麼有時可以,有時不可以呢! |
|