-2
我似乎無法得到這個與onchange
事件一起工作。警報觸發器,但我需要提交表單。JavaScript onchange提交表單到不同的位置
<script>
function validatelink3(returnpartid){
alert("test");
var theform = document.partsform;
theform.action="process_quickedited.asp?returnpartid="+returnpartid;
}
</script>
<form id="partsform" name="partsform" method="post" action="process_quickedited.asp?returnpartid=undefined">
<select name="STOCKACTION<%=objRst.fields("returnpartid")%>" id="STOCKACTION<%=objRst.fields ("returnpartid")%>" onchange="validatelink3(<%=objRst.fields("returnpartid")%>)">
<option value="<%response.write objRst.fields("stockaction")%>" selected="selected"><%response.write objRst.fields("stockaction")%></option>
<option value="Return To Supplier">Return To Supplier</option>
<option value="Stock">Stock</option>
<option value="Scrap">Scrap</option>
<option value="Quarantine">Quarantine</option>
<option value="Test">Test</option>
</select>
你想要做什麼? – Amy 2014-11-05 06:53:35
使用window.location代替 – Amy 2014-11-05 06:56:32
嗨艾米,我想提交一個表單稱爲partsform到位置=「process_quickedited.asp?returnpartid =」+ returnpartid; - 我不認爲我可以使用window.location,因爲這不會提交表單? – Emma 2014-11-05 07:01:28