JQueries是否在IE8中工作?

时间:2023-01-17 13:06:17

I am making use of the JQuery fancy box - in this pop up box I have a form with a few select fields and upon changing these slect fields a value in a span element should change. I have got this to work (actually with * users help) but the solution doesn't work in IE8...suprise...suprise.

我正在使用JQuery花哨的框——在这个弹出框中,我有一个包含几个选择字段的表单,在更改这些斜线字段时,span元素中的值应该会发生改变。我已经让它起作用了(实际上在*用户的帮助下),但是这个解决方案在IE8中不起作用…

I make changes to the select field but the value does not change. I was wondering if anyone could give me any ideas why this might be the case by just having a look at the following JS code. Does the live function now work in IE8?!!

我对select字段进行了更改,但值没有更改。我想知道是否有人可以通过查看下面的JS代码来告诉我为什么会出现这种情况。实时功能现在在IE8中工作吗?

JS Code:

JS代码:

$('select.htt, select.hst').live('change', function() {
    var channels = parseInt($('#fancy_div select.hst').val(), 10) * parseInt($('#fancy_div select.htt').val(), 10);         
    $('#fancy_div span.yellow2').html(channels + 'Channels');
});

I have pasted the HTML here: http://www.copypastecode.com/13356/ - its a lot of HTML!

我在这里粘贴了HTML: http://www.copypastecode.com/13356/—它有很多HTML!

Thanks all for any help or guidance why this isn't working on IE. IE doesn't seem to register the changes of the select fields.

感谢所有的帮助或指导,为什么这没有在IE上工作。IE似乎没有注册选择字段的更改。

3 个解决方案

#1


8  

jQuery live does work in IE8, but the live handlers don't support the change event.

jQuery live在IE8中可以工作,但是live处理程序不支持更改事件。

Possible event values: click, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, keydown, keypress, keyup

可能的事件值:单击、dblclick、mousedown、mouseup、mousemove、mouseover、mouseout、keydown、keypress、keyup

Currently not supported: blur, focus, mouseenter, mouseleave, change, submit

目前不支持:blur, focus, mouseenter, mouseleave, change, submit

#2


9  

live does not support the change event. From the manual:

live不支持更改事件。从手册:

Possible event values: click, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, keydown, keypress, keyup
Currently not supported: blur, focus, mouseenter, mouseleave, change, submit

可能的事件值:单击、dblclick、mousedown、mouseup、mousemove、mouseover、mouseout、keydown、keypress、keyup当前不支持:blur、focus、mouseenter、mouseleave、change、submit。

#3


-1  

Live also not support paste event Handler hence use bind

Live也不支持粘贴事件处理程序,因此使用bind

#1


8  

jQuery live does work in IE8, but the live handlers don't support the change event.

jQuery live在IE8中可以工作,但是live处理程序不支持更改事件。

Possible event values: click, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, keydown, keypress, keyup

可能的事件值:单击、dblclick、mousedown、mouseup、mousemove、mouseover、mouseout、keydown、keypress、keyup

Currently not supported: blur, focus, mouseenter, mouseleave, change, submit

目前不支持:blur, focus, mouseenter, mouseleave, change, submit

#2


9  

live does not support the change event. From the manual:

live不支持更改事件。从手册:

Possible event values: click, dblclick, mousedown, mouseup, mousemove, mouseover, mouseout, keydown, keypress, keyup
Currently not supported: blur, focus, mouseenter, mouseleave, change, submit

可能的事件值:单击、dblclick、mousedown、mouseup、mousemove、mouseover、mouseout、keydown、keypress、keyup当前不支持:blur、focus、mouseenter、mouseleave、change、submit。

#3


-1  

Live also not support paste event Handler hence use bind

Live也不支持粘贴事件处理程序,因此使用bind