0
我有下面的JavaScript函數去選擇框值url。在選擇框上使用javascript轉到url DropDown框
function go(x) {
alert(x);
location = x.value;
}
爲用戶的不同 我寫一個PHP打印表格和DIV裏面所有的選擇框,我不能使用的getElementById 可能有超過1個選擇框
<div class="styled-select">
<form name="menu">
<select id=Admission onchange=go(this)>
<option value=/admission>Add Existing Students</option>
</select>
<select id=Student onchange=go(this)>
<option value=www.bing.com>Student Details</option>
</select>
</form>
</div>
所有建議都歡迎。
謝謝@thiefmaster –
如果這是您需要的答案,請將其標記爲已接受! –