有一種簡單的方法讓用戶從SUBMIT上的下拉列表轉到URL,而不是onChange。下拉選擇表單,轉到URL上提交
我有這樣的代碼:
<form name="cityselect">
<select name="menu" onChange="top.location.href=this.options[this.selectedIndex].value;" value="GO">
<option selected="selected">Select One</option>
<option value="http://www.domain-one.com">London</option>
<option value="http://www.domain-two.com">Glasgow</option>
</select>
試圖改變的onChange到的onsubmit,但它不工作。
一個選擇沒有提交甚至。提交事件與表單一起提交。 – Manish