extjs的panel组件怎么使用,为什么我的不显示效果
<script>Ext.onReady(function(){<divid="hello"></div>varpanel=newExt.Panel({title:"hel...
<script>
Ext.onReady(function()
{
<div id="hello"></div>
var panel=new Ext.Panel({title:"hello",width:300,height:200,html:'<h1>Hello,easyjf open source</h1>'});
panel.render("hello");
});
</script> 展开
Ext.onReady(function()
{
<div id="hello"></div>
var panel=new Ext.Panel({title:"hello",width:300,height:200,html:'<h1>Hello,easyjf open source</h1>'});
panel.render("hello");
});
</script> 展开
2个回答
展开全部
请把<div id="hello"></div>放在<script></script>外面。
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>XML Form</title>
<link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
<script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="../../ext-all.js"></script>
</head>
<body>
<div id="hello"></div>
<script>
Ext.onReady(function()
{
var panel=new Ext.Panel({
title:"hello",
width:300,
height:200,
html:'<h1>Hello,easyjf open source</h1>'
});
panel.render("hello");
});
</script>
</body>
</html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>XML Form</title>
<link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" />
<script type="text/javascript" src="../../adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="../../ext-all.js"></script>
</head>
<body>
<div id="hello"></div>
<script>
Ext.onReady(function()
{
var panel=new Ext.Panel({
title:"hello",
width:300,
height:200,
html:'<h1>Hello,easyjf open source</h1>'
});
panel.render("hello");
});
</script>
</body>
</html>
展开全部
改成下面的代码试试:
<script>
Ext.onReady(function()
{
<div id="hello"></div>
var panel=new Ext.Panel({
title:"hello",
width:300,
height:200,
html:'<h1>Hello,easyjf open source</h1>',
renderTo:'hello'
});
});
</script>
<script>
Ext.onReady(function()
{
<div id="hello"></div>
var panel=new Ext.Panel({
title:"hello",
width:300,
height:200,
html:'<h1>Hello,easyjf open source</h1>',
renderTo:'hello'
});
});
</script>
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询