它将是 onfocus="this.blur()"
但你为什么要这样做?只需禁用它。如果您需要该值,请将其复制到隐藏字段
更新:
<script>
function changeSel(idx) {
var sel = document.forms[0].sel;
sel.selectedIndex=idx;
sel.form.selCopy.value=idx;
}
window.onload=function() {
changeSel(document.forms[0].sel.selectedIndex);
}
</script>
<form>
<input type="text" name="selCopy" value="not set" />
<select name="sel" size="1" disabled="disabled">
<option>Zero</option>
<option>One</option>
<option selected>Two</option>
<option>Three</option>
<option>Four</option>
</select>
<input type="button" onClick="changeSel(3)" value="Three" />
</form>