博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
在ie8下ext显示的问题
阅读量:7251 次
发布时间:2019-06-29

本文共 3769 字,大约阅读时间需要 12 分钟。

在ie8下,点击左边的树形导航栏,在右面板中,弹出相对应的内容,这些内容都写在iframe中,但是在ie8下,需要随便在页面上点击一下鼠标,才能显示内容,换成Firefox和ie7,都能正常的显示,求各位高手解答。

这是部分代码

HTML code
<%
@ page contentType
=
"
text/html;charset=UTF-8
"
%>
<%
@ include file 
=
"
/includes/jsp/init.jsp
"
%>
<!
DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
>
<
html 
xmlns
="http://www.w3.org/1999/xhtml"
>
<
head
>
<
title
>
系统首页
</
title
>
<!--
 引入基础的JS和CSS文件 
-->
<%
@ include file
=
"
/common/meta_ext.jsp
"
%>
<
link 
href
="/resources/css/index/index.css"
 rel
="stylesheet"
 type
="text/css"
/>
<
link 
href
="/resources/css/index/index-treetab.css"
 rel
="stylesheet"
 type
="text/css"
/>
<
script 
src
="/resources/js/index/index.js"
 type
="text/javascript"
></
script
>
<
script 
src
="/resources/js/ext/ux/Portal.js"
 type
="text/javascript"
></
script
>
<
script 
src
="/resources/js/ext/ux/PortalColumn.js"
 type
="text/javascript"
></
script
>
<
script 
src
="/resources/js/ext/ux/Portlet.js"
 type
="text/javascript"
></
script
>
<
script 
src
="/resources/js/ext/ux/TabCloseMenu.js"
 type
="text/javascript"
></
script
>
<
script 
src
="/resources/js/jquery/jquery.js"
 type
="text/javascript"
></
script
>
<
script 
type
="text/javascript"
>
var
opername
=
'
<%= user.getOperName()%>
'
; Ext.onReady(
function
(){ Ext.QuickTips.init(); 
//
定义页头
var
 header 
=
new
Ext.Panel({ border: 
false
, layout: 
'
anchor
'
, region: 
'
north
'
, margins: 
'
0 0 1 0
'
, height: 
100
, items: [{ xtype: 
'
box
'
, el:
'
header
'
, border: 
false
, anchor: 
'
none -1
'
 }], bbar: [ 
'
->
'
,
'
-
'
,{ xtype: 
'
splitbutton
'
, text: 
'
当前用户:
'
+
opername, iconCls:
'
icon-user-male
'
, menu: [{ text:
'
修改用户基本信息
'
, handler:help },{ text:
'
修改密码
'
, handler:help }] },
'
-
'
,{ text: 
'
退出系统
'
, iconCls: 
'
icon-exit
'
, handler: relogin },
'
-
'
] }); 
//
定义树菜单控件
var
 tree 
=
new
 Ext.tree.TreePanel({ useArrows: 
true
, animate: 
true
, enableDD: 
false
, border: 
false
, rootVisible: 
false
, autoScroll: 
true
, containerScroll: 
true
, bodyStyle:
'
padding:3px
'
, root: 
new
 Ext.tree.AsyncTreeNode({ id: 
'
-1
'
, draggable: 
false
, leaf: 
false
 }), loader: 
new
Ext.tree.TreeLoader({ dataUrl: 
'
/extAction.do?task=getTreeJson
'
, listeners: { 
"
beforeload
"
function
(treeLoader, node){ treeLoader.baseParams.id 
=
 node.id; } } }) }); tree.on(
'
click
'
function
(node, e){ 
if
(node.id 
!=
-
1
&&
node.attributes.url 
!=
null
){ openUrl(node.attributes.url); }
else
{ tree.expandPath(node.getPath()); } }); tree.on(
'
beforeexpandnode
'
function
(node){ 
if
(node.id
!=-
1
&&
node.getDepth()
==
1
){ tree.collapseAll(); } }); 
//
定义树菜单面板
var
 treePanel 
=
new
 Ext.Panel({ region: 
'
west
'
, collapsible: 
true
, autoScroll: 
true
, split: 
true
, iconCls: 
'
icon-expand-all
'
, title: 
'
菜单导航
'
, width: 
220
, maxWidth: 
300
, minWidth: 
220
, margins: 
'
0 0 3 5
'
, items: tree }); 
//
定义主界面整体布局
var
 viewPort 
=
new
 Ext.Viewport({ layout: 
'
border
'
, items: [header, treePanel, 
new
 Ext.Panel({ id:
'
main_panel
'
, region: 
'
center
'
, width:
400
, contentEl:
'
con
'
 })] }); }); 
function
 openUrl(url){ 
if
(url
!=
null
){ document.getElementById(
'
misFrame
'
).src 
=
 url; } } 
</
script
>
</
head
>
<
body
>
<
div 
id
="header"
 style
="background-image:url(/resources/images/background/header6.jpg);background-repeat: repeat-x;"
>
<
img
src
="/resources/images/background/toplf5.jpg"
/>
</
div
>
<
div 
id
="con"
 style
="height:100%;"
>
<
iframe 
src
="http://www.baidu.com"
 id
="misFrame"
 name
="misFrame"
 width
="100%"
 height
="100%"
 frameborder
="0"
></
iframe
>
</
div
>
</
body
>
</
html
>
 
 
 
 
=====================================================
答案:
在<head>中间加一句<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
本文转自左正博客园博客,原文链接:http://www.cnblogs.com/soundcode/archive/2011/12/16/2290324.html,如需转载请自行联系原作者
你可能感兴趣的文章
python 数据加密以及生成token和token验证
查看>>
优达学城数据分析师纳米学位——P4项目知识点整理及代码分析
查看>>
压缩 KVM 的 qcow2 镜像文件
查看>>
python 读写文件中 w与wt ; r与rt 的区别
查看>>
深究“通过样式表实现固定表头和列”
查看>>
《Office 365开发入门指南》上市说明和读者服务
查看>>
Docker生态会重蹈Hadoop的覆辙吗?
查看>>
WPF换肤之八:创建3D浏览效果
查看>>
JEECG环境搭建(Maven版本)-总结Eclipse
查看>>
HTTP第一篇【简单了解HTTP、与HTTP相关的协议】
查看>>
Python生成随机验证码
查看>>
Python学习笔记(3)——数据类型和变量
查看>>
03、微信小程序之 永不过时的HelloWorld
查看>>
NFS配置不当那些事
查看>>
[译] 如何写出更好的 React 代码?
查看>>
一起撸个朋友圈吧(step3) - ListAdapter篇
查看>>
LeetCode 642 号问题:设计搜索自动补全系统
查看>>
探究Android View 绘制流程,Canvas 的由来
查看>>
JS原生交互
查看>>
[译] JavaScript 工作原理:Web Worker 的内部构造以及 5 种你应当使用它的场景
查看>>