var event;if (document.createEvent){event = document.createEvent("HTMLEvents");event.initEvent("change", true, false);document.getElementById("fname").dispatchEvent(event);} else {document.getElementById("fname").fireEvent("onchange")}
http://www.w3school.com.cn/jsref/dom_obj_event.asp
时间: 2024-10-21 06:04:24