クロムで実行中のこのコードは、リストボックスを無効にすることはできません...しかし、Firefoxで動作しています...すべてのブラウザで動作する共通のスクリプトはありますか
<script>
function fun()
{
//alert("welcome==>"+document.getElementById("geography").value);
if(document.getElementById("geography").value!=0)
{
document.getElementById("country").disabled=true;
document.getElementById("state").disabled=true;
}
else
{
document.getElementById("country").disabled=false;
document.getElementById("state").disabled=false;
}
}
}
</script>
</head>
<body>
<form name="example" action ="" method="get">
<table>
<tr><td>Geography</td> <td><select name="geography" id="geography"
onchange="fun()">
<option value="0">select</option>
<option value="1">zone</option>
<option value="2">state</option>
<option value="3">city</option>
</select></td></tr>
</table>
<table>
<tr><td>country</td> <td><select name="country" id="country">
<option value="0">select</option>
<option value="1">india</option>
<option value="2">china</option>
<option value="3">pak</option>
</select></td></tr>
</table>
<table>
<tr><td>state</td> <td><select name="state" id="state">
<option value="0">select</option>
<option value="1">tamil</option>
<option value="2">kerala</option>
<option value="3">andra</option>
</select></td></tr>
</body>
この問題を解決するための解決策を親切に提供してください...