使用autoEl,在Firefox一切正常,但在IE7中将导致一个问题。具体是
Unexpected call to method or property access. 这个问题可能会影响其他部分代码的正常显示和功能。因此必须处理。
Unexpected call to method or property access. 这个问题可能会影响其他部分代码的正常显示和功能。因此必须处理。
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>test</title>
<script type="text/javascript" src="ext/ext-2.1/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="ext/ext-2.1/ext-all-debug.js"></script>
<link rel="stylesheet" type="text/css" href="ext/ext-2.1/resources/css/ext-all.css" />
</head>
<body>
<script>
Ext.onReady(function(){
Ext.QuickTips.init();
var agingPanel = new Ext.Panel({
renderTo:'div1',
height:230,
width:350,
items:[
{autoEl: {tag:'img', src:'./images/aging.png'}}
//{
// html:'<img src="./images/aging.png">'
//}
]
});
});
</script>
<div id="div1"></div>
</body>
</html>