English 中文(简体)
Jquery$ (#someID > div ).each (Function(){.}) not working in IE.
原标题:Jquery $( #someID > div ).each(function(){..}) not working in IE

i 只有在我使用我的系统顶点进入网页时,才不会面对这一问题,而且只有我能与我一起来! (关于所有其他浏览器的工作)

a. 使用Tomcat V6.0.0.29、IE8

I tried debugging the JS code using IE developer tools debugger, ofcourse when I open using http://localhost:8080/ everything works perfectly fine, but when I use http://myIP:8080/ this loop is giving a problem :-

$( #someId > div ).each(function(){...}); 

如同在座右翼中一样,它只是一种ski。 此外,我还检查了他们在当地工作的身份证,为什么在我使用我的IP时,这会造成问题?

Note :- a. (correction) The problem is only there in IE7, it works perfectly in IE8.

b) 当它放弃了我们所希望的东西时,就会发生! i m 使用IE8, 当利用当地东道机构开放这一网页时,开发商的工具显示其使用IE8标准,但在使用IP地址进入该网页时,开发商的工具显示其使用IE7标准。 当标准被修改为第8号独立实体时,它工作(使用IP地址)!

c) 但是,问题在于它为什么不与E7合作! 如同在一切工作中一样,除上文提到的休息室外,一切工作都是一样的。

最佳回答

最后,我知道在E7号文件中造成这一问题的原因是什么。 审议下列情况:

<div id="div1">abc
          <div id="div2">def
                   <div>hjs</div>
                   <div>zyx</div>
          </div>
          <div id="div3">xsj
                   <div>ask</div>
                   <div>iue</div>
          </div>
</div>

支部曾写过这些小块的 trav子。

(“#divId > div”).each(功能){};

如今,第一级四级四级四级四级四级四级四级四级四级四级四级四级四级四级四级四级四级四级四级四级四级四级四舍五入,四级四级四级四级四级四级四级四级四级四级四级四级四级四级四级四级四级四级四级四级四级四级四级四级四舍五入。

(“#div2 > div”).each(功能){};

This worked in all browsers (even in IE8!!) but not in IE7. This is because apparently IE7 requires the exact child selector for divs. So for IE7 something like this needs to be written:-

(“#div1 > #div2 > div”)each(功能){.});

a. 零碎块内 trav碎块的涂料“div2”

So the problem was cause just by my lack of knowledge about IE7!! sorry n thanks guys!

问题回答

迷惑人心的是,它会把一些东西视为邪恶,因为浏览器在装上当地东道方时不会打上该页,而是在使用时从海滩上阅读。 确保你把这页装上你本人的空洞。

Check to see if your script is loaded when using your IP address. Sometimes browsers don t load scripts on special situations (for example when you want to load a script from an http source into an https page). Also you should check IE s security configuration.
To check whether your script is loaded and executed or not, simply put an alert( loaded ) statement at the beginning of your code.

这可能是因为贵公司采取集团政策,强迫内联网网站使用兼容模式的具体版本。 当我向我的网页介绍一些IE10+ Javascript图书馆时,我遇到了同样的问题。

“IE

围绕这一点开展工作,你可以要求贵公司信息技术公司改变政策,或迫使浏览器不要使用与以下标签的兼容性观点。

<meta http-equiv="X-UA-Compatible" content="IE=Edge" />

More details for this tag can be found with the topic below.

StackOverflow - 使用标签的电离听器





相关问题
selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

How to fire event handlers on the link using javascript

I would like to click a link in my page using javascript. I would like to Fire event handlers on the link without navigating. How can this be done? This has to work both in firefox and Internet ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Clipboard access using Javascript - sans Flash?

Is there a reliable way to access the client machine s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use ...

javascript debugging question

I have a large javascript which I didn t write but I need to use it and I m slowely going trough it trying to figure out what does it do and how, I m using alert to print out what it does but now I ...

Parsing date like twitter

I ve made a little forum and I want parse the date on newest posts like twitter, you know "posted 40 minutes ago ","posted 1 hour ago"... What s the best way ? Thanx.

热门标签