这近在项目中要用可以编辑的下拉列表框 在网上搜了下 照网上改动下 兼容FF取消默认事件没有加上 可以加上event.preventDefault(); 作个标记 以后备用 呵呵.. 大家有什么好的办法解决 多提提意见! <mce:script type="text/javascript"><!-- function Catch_keydown(e,sel) { var theen = e.keyCode ? e.keyCode : e.which; switch (theen) { case 13: sel.options[sel.length] = new Option("", "", false, true); event.returnValue = false; break; case 46: if (confirm("你确定删除此选项吗?")) { if (sel.options.length == 1) { alert('不能删除!') } else { sel.options[sel.selectedIndex] = null; if (sel.length > 0) { sel.options[0].selected = true; } } } event.returnValue = false; break; } } function catch_press(e, sel) { var theen = e.keyCode ? e.keyCode : e.which; sel.options[sel.selectedIndex].text = sel.options[sel.selectedIndex].text + String.fromCharCode(theen); } // --></mce:script> <select id="sel1" οnkeydοwn="Catch_keydown(event,this);"οnkeypress="catch_press(event,this)"> <option>上海</option> <option>杭州</option> <option>南京</option> <option>深圳</option> </select>