[問題] has no properties
我寫了一段javascript想要使用者選了options裡面的其中一個選項又就
調到那個網頁
<script language="JavaScript">
function gotopage(){
URL = document.gotoform.action.options[document.gotoform.action
.selectedIndex ].value;
window.location.href = URL;
}
</script>
<td class="actions">
<form name="gotoform" method="post" action="">
<select name="action" size="1" onChange="gotopage()">
<option value="">Select an Action</option>
<option value=" www.google.com">google</option>
<option value="www.yahoo.com">Yahoo</option>
<option value=" www.sina.com.">Sina</option>
</select>
</form>
</td>
firebug報錯說document.gotoform.action has no properties
想請問我應該怎麼修正呢?
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 69.137.163.228
推
12/05 16:28, , 1F
12/05 16:28, 1F
推
12/07 14:44, , 2F
12/07 14:44, 2F
→
12/07 14:44, , 3F
12/07 14:44, 3F
Ajax 近期熱門文章
PTT數位生活區 即時熱門文章