喜欢篮球的男生:javascript 动态添加列表事件

来源:百度文库 编辑:中科新闻网 时间:2024/05/01 00:09:01
var myform = window.document.getElementById("myform");
var mySelect = window.document.createElement("select");
mySelect.style.width = "160px";
mySelect.multiple=true;
mySelect.name="myselect";
mySelect.ondblclick="OpenSmallWindows(myform.myselect.options[myform.myselect.selectedIndex].value)";
mySelect.size=25;

mySelect.ondblclick="OpenSmallWindows(myform.myselect.options[myform.myselect.selectedIndex].value)";

别的都可以.为什么加不了事件? 我想要加一个双击事件