0
我無法使我的列表框鏈接正常工作。我在這個網站上找到了下面的代碼,但是當我在瀏覽器中預覽它時,鏈接適用於我選擇的第一個選項,但如果我嘗試第二個選項,瀏覽器會告訴我它找不到該頁面。如何使用JavaScript在<option>標記中包含鏈接
<select onchange="javascript:handleSelect(this)">
<option value="../Pages/Examples of Business plans/Business plan samples">Agriculture</option>
<option value="../Pages/Examples of Business plans/Business plan samples">Automotive</option>
<option value="../Pages/Examples of Business plans/Business plan samples">Hospitality</option>
</select>
<script type="text/javascript">
function handleSelect(elm)
{
window.location = elm.value+".php";
}
</script>