IE选择器的永恒问题 [英] IE everlasting problem with selectors
本文介绍了IE选择器的永恒问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我认为我在IE中使用jquery选择器时遇到了一些问题。 Chrome和Firefox都可以,但不是IE。不仅下面的示例中的选择器不起作用。每个选择器都不适用于IE。
我使用的是jquery 1.6.2和jquery-ui.min 1.8
示例:
html:
I think that i have some problems with jquery selectors in IE. Chrome and Firefox is ok, but not IE. Not only selector from example below not works. Every selectors not works in IE.
I am using jquery 1.6.2 and jquery-ui.min 1.8
Example:
html:
<p id="clickme">clik me</p>
jquery:
$(function(){
$('#clickme').click(function(){alert('hello')})
})
推荐答案
好的,我在IE上遇到了很多语法问题。养成使用半冒号的习惯。我看了你的JavaScript文件,有很多似乎不存在。
Ok, I have had tons of problems with syntax on IE. Get in the habit of using semi colons. I looked at your JavaScript file and there was quite a few that seem to be non existent.
$('#clickme').click(function(){
alert('hello');
});
这篇关于IE选择器的永恒问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文