大佬教程收集整理的这篇文章主要介绍了jquery – Internet Explorer和Very Strange iFrame行为的情况,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
function spawnNewWindow(url,title,typE) { //Does another window with that particular type already exist? //If so,just point it at the new link without actually spawning a new window. var cancelSpawn = false; if ( $('.windowType_'+typE).length ) { //@R_674_9531@e the SRC attribute for the iframe contained within the window. This should effectively //reload the window too. $('.windowType_'+typE).children("iframe").attr("src","/darknova4/"+url); } else { //First,create the window $("body").append( "<div class='window'> \ <div class='resizeArea'></div> \ <div class='titlebar'>"+title+"</div> \ <div class='closeWindow'></div> \ <div class='windowContent newspawn'><iframe src='/darknova4/"+url+"' frameborder='0' width='100%' height='100%' scrolling='auto'></iframe></div> \ </div>"); //Move this window to the top of the stack $(".newspawn").parent(".window").css("z-index",windowZIndex++); //Set the data for this window's type,will be used to prevent copy windows being open later $(".newspawn").addClass("windowType_"+typE); //Set up the window for moving and resizing and other stuff setupWindows(); //Finally,remove the "newspawn" flag from the window,since it has content and we don't need work with it anymore. $(".newspawn").removeClass("newspawn"); } }
在Internet Explorer上,这会生成一个空白的白色窗口,指示一个不可见的iFrame,因为我的所有窗口页面都有黑色背景.我怀疑着名的(并且仍然不太固定)z-index错误,所以@R_7_10673@下更改来使用堆叠顺序,看看我是否能找到快速修复:
$("body").append( "<div class='window'> \ <div class='resizeArea'></div> \ <div class='titlebar'>"+title+"</div> \ <div class='closeWindow'></div> \ <div class='windowContent newspawn'><iframe style='position: relative;' src='/darknova4/"+url+"' frameborder='0' width='100%' height='100%' scrolling='auto'></iframe></div> \ </div>");
注意相对位置,它应该是对象的默认位置,但不是因为堆叠错误.这段代码会发生什么,窗口显示,iFrame显示,所有看起来都很好,直到你尝试使用它.我无法解释原因,但Mousing over iFrame导致它消失.我没有与鼠标移动事件绑定的网站上的代码,并且iFrame页面上没有任何代码会导致它在鼠标悬停时执行任何操作.这真的很奇怪.有没有人知道为什么它可能会这样表现?
如果你需要亲自看看这个行为,我已经测试了在www.darknovagames.com上实现的系统,它在firefox中运行良好,但正如所提到的那样在IE中真的很棒.如果您认为它会有所帮助,我可以发布更多代码,但这是我认为错误的地方.也就是说,我很乐意在父窗口上发布CSS,为我的鼠标事件发布JavaScript等.
感谢任何能够对这种奇怪行为提供一些见解的人.
以上是大佬教程为你收集整理的jquery – Internet Explorer和Very Strange iFrame行为的情况全部内容,希望文章能够帮你解决jquery – Internet Explorer和Very Strange iFrame行为的情况所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。