I use this code for simulate click
on select
element:
$(function(){
$("#click").click(function(){
$("#ts").click();
//$("#ts").trigger("click");
});
});
and HTML code is:
<select id="ts">
<option value="1">1</option>
<option value="2">Lorem ipsum dolor s.</option>
<option value="3">3</option>
</select>
<input type="button" id="click" value="Click"/>
I test click
and trigger
but both not work.
Thanks for any help.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…