jquery change()事件没有触发 [英] jquery change() event not firing
本文介绍了jquery change()事件没有触发的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有两个下拉菜单和一个文本框。我想显示下拉列表中所选值的乘法。
我试图在jQuery中使用change()函数。但是更改功能没有触发。即使我尝试了正常的警报也没有任何反应。
I have two drop-downs and one text box. I want to display multiplication of selected values from both the drop-downs.
I am trying to use change() function in jQuery. However change function is not firing. Even If i tried normal alert with it nothing happens.
$('#container select').change(function () {
alert(this).html();
});
我使用的是IE6和jquery-1.4.1.min.js
I am using IE6 and jquery-1.4.1.min.js
推荐答案
(' #container select')。 (function(){
alert( this )。html();
});
('#container select').change(function () { alert(this).html(); });
我使用IE6和jquery-1.4.1.min.js
I am using IE6 and jquery-1.4.1.min.js
我不知道这是否有效:
i don't know whether this works:
alert(this).html()
i mean检查第一个简单警报,例如:
i mean check first simple alert such as:
alert('hello');
如果它可以正常工作,那么其他se b / b
试试:
if it works then fine , otherwise
try:
(' #controlId')。live(' 更改',功能(e){
alert(' 你好跨度>);
});
});
('#controlId').live('change', function (e) { alert('Hello'); }); });
这篇关于jquery change()事件没有触发的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文