生活随笔
收集整理的這篇文章主要介紹了
在ie8下ext显示的问题
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
在ie8下,點擊左邊的樹形導(dǎo)航欄,在右面板中,彈出相對應(yīng)的內(nèi)容,這些內(nèi)容都寫在iframe中,但是在ie8下,需要隨便在頁面上點擊一下鼠標(biāo),才能顯示內(nèi)容,換成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>系統(tǒng)首頁</title><!--引入基礎(chǔ)的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">varopername='<%= user.getOperName()%>'; Ext.onReady(function(){ Ext.QuickTips.init(); //定義頁頭varheader =newExt.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: '當(dāng)前用戶:'+opername, iconCls: 'icon-user-male', menu: [{ text:'修改用戶基本信息', handler:help },{ text:'修改密碼', handler:help }] },'-',{ text: '退出系統(tǒng)', iconCls: 'icon-exit', handler: relogin },'-'] }); //定義樹菜單控件vartree =newExt.tree.TreePanel({ useArrows: true, animate: true, enableDD: false, border: false, rootVisible: false, autoScroll: true, containerScroll: true, bodyStyle: 'padding:3px', root: newExt.tree.AsyncTreeNode({ id: '-1', draggable: false, leaf: false}), loader: newExt.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(); } }); //定義樹菜單面板vartreePanel =newExt.Panel({ region: 'west', collapsible: true, autoScroll: true, split: true, iconCls: 'icon-expand-all', title: '菜單導(dǎo)航', width: 220, maxWidth: 300, minWidth: 220, margins: '0 0 3 5', items: tree }); //定義主界面整體布局varviewPort =newExt.Viewport({ layout: 'border', items: [header, treePanel, newExt.Panel({ id:'main_panel', region: 'center', width:400, contentEl:'con'})] }); }); functionopenUrl(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" />
總結(jié)
以上是生活随笔為你收集整理的在ie8下ext显示的问题的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。