http://jsfiddle.net/piezack/X8D4M/5/
我需要通过单击要检测的按钮创建的更改。目前,您必须在字段内部单击,然后在字段外部单击,才能检测到任何更改。
谢谢大家。
按钮的代码无法更改。不过到目前为止,尝试还不错。
让事情变得过于复杂。回答http://jsfiddle.net/piezack/X8D4M/56/
最佳答案
//waits till the document is ready
$(document).ready(function() {
$('button.butter').click(function() {
var $form6 = $('#FormCustomObject6Name');
$form6.val('Text has changed');
$form6.trigger('change')
});
$('#FormCustomObject6Name').change(function() {
var x = $('#FormCustomObject6Id').val();
$("a").filter(function() {
return this.href = 'http://www.msn.com'
}).attr('href', 'http://www.google.com/search?q=' + x);
alert(x);
});
});
关于javascript - JQuery - 我该怎么做才能完成这项工作?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7600144/