0
我想我需要onChange。選項OnClick不能在IE中工作?但工作在FF
function changeFree() {
var a = document.getElementById("aSelectControl");
a.options[a.selectedIndex].text = "Available";
}
function changeUnavailable() {
var a = document.getElementById("aSelectControl");
a.options[a.selectedIndex].text = "Unavailable";
}
<select>
<option onClick="changeFree()">Available</option>
<option onClick="changeUnavailable()">Provisonal Booking</option>
<option onClick="changeUnavailable()">Fully Booked</option>
</select>
<select id="aSelectControl">
<option>Available</option>
<option>Provisonal Booking</option>
<option>Fully Booked</option>
</select>
是的IE8。我沒有檢查過IE9。我會嘗試使用onchange。謝謝 – user692669 2011-04-05 15:28:42