---
title: "Ext.Panel HTML设置问题"
author: "Sev7en_jun"
date: "2011-11-01T11:34:13Z"
tags: []
categories: ["Web前端"]
slug: "ext-panel-html"
draft: false
lastmod: "2011-11-01T12:55:12Z"
id: 1226562
url: "https://jyao.iteye.com/blog/1226562"
---

var Test= new Ext.Panel({  
        id:Test\_panel',  
        title:'业务地图',  
        listeners: {activate: handleTestActivate},  
        margins:'5 0 0 5',//up right down left  
        **html**:'&lt;iframe id="mapTro" src="/Test.html" width="100%" height="100%" frameborder="0" scrolling="auto"&gt;&lt;/iframe&gt;'  
          });

 

如上所示：  
src设置本地html在页面上无法显示。

   
\------------------------------------------------------------------------ 

***解决方案：***如果无法加载html文件，在**Panel**里面加入属性

        **frame: true,**  
        **frameHeader: true,//这个好像不是必须的**

就可以正常引入Test.html，路径根据实际情况定