<
html
>
<
head
>
</
head
>
<
body
>
<script
type=
"text/javascript"
>
Ext.
define(
'Wallpaper',{
extend:
'Ext.Component',
alias:
'widget.wallpaper',
html:
'<img src="desk.jpg">'
});
//来一个panel的例子
Ext.
onReady(
function(){
Ext.
create(
'Ext.panel.Panel',{
title:
'component design',
height:
150,
width:
200,
frame:
true,
renderTo:
Ext.
getBody(),
items:[
{
xtype:
'button',
text:
'hello'},
{
xtype:
'wallpaper'}
]
});
});
</script
>
</
body
>
</
html
>