有没有办法用
jquery /
javascript以编程方式触发.change事件?我想要一段代码,它将为选择/选项框启动.change事件,如下所示……
<div data-role='fieldcontain' class='none'> <select name='ACTC' class='none cl_preAction' > <option data-location='S' value='001'>Fire</option> <option data-location='T' value='002'>Flood</option> <option data-location='T' value='003'>End Of World</option> </select> </div> </td>
解决方法
只需拨打
change()即可.
$(".cl_preAction").change();
Bind an event handler to the “change” JavaScript event,or trigger that event on an element.