var now = new Date(); function setDate(type, id, from, to) { var str = ""; for (var i = from; i < to + 1; i++) { if ((type == "y" && i == now.getFullYear()) || (type == "m" && i == now.getMonth() + 1) || (t
1.动态创建select function createSelect(){ var mySelect = document.createElement("select"); mySelect.id = "mySelect"; document.body.appendChild(mySelect); } 2.添加选项option function addOption(){ //根据id查找对象, var
document.getElementById("louyuming").options[0].selected=true; function jsSelectIsExitItem(objSelect, objItemValue) { var isExit = false; for (var i = 0; i < objSelect.options.length; i++) { if (objSele