1
$(document).ready(function() {
$('#text').live('change', function() {
alert('hello');
});
$('#button').live('click', function() {
$('#text').val('some text');
});
});
<div>
<input type="button" id="button" value="Click Me" />
<input type="text" id="text" />
</div>
當我單擊按鈕時,如何使文本框觸發器上的change
函數?由於當使用javascript設置值時,TextBox onchange(jQuery)