English 中文(简体)
D. j子事件引起的问题
原标题:Odd problem with jQuery .change() event
  • 时间:2010-12-14 21:07:02
  •  标签:
  • jquery
  • html

I have the following select element with an onchange event.

<select name="ftest" onchange="alert( test );">
  <option value="0"></option>
  <option value="test">test</option>
</select>

随后,我用jQuery(1.4.4)将另一场活动与网页上的所有选定内容联系起来。

   $("SELECT").change(function(){
    _isDirty = true;
   });

其结果是,我在改变我选定的名单价值时两次发出警告。

任何人都知道为什么发生这种情况,或者有办法解决这一问题?

增 编

最佳回答

这是,与IE和jQuery相见,因为它们模拟了change的泡沫。 不幸的是,除了去除“条形码>交换<><>条码/代码>手稿”外,目前还未进行清理工作。

问题回答

我认为,“ j”增加了处理人员,而不是取代他们。 因此,就上述内容而言,你可以拿到一张你在选任席位上的换称号,而另一张钱子的添加。





相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签