<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>Ext.get</title>
<link rel="stylesheet" type="text/css" href="./ext-2.0.2/resources/css/ext-all.css"/>
<script src="./ext-2.0.2/adapter/ext/ext-base.js"></script>
<script src="./ext-2.0.2/ext-all.js"></script>
<script>
Ext.onReady(function(){
Ext.BLANK_IMAGE_URL="./ext-2.0.2/resources/images/default/s.gif";
});
var changeColor = function(){
Ext.get('changeDiv').highlight('FF0000',{
endColor:'0000FF',
duration:3
});
}
//还有一个Ext.fly也可以达到get的功能,并且fly使用的是同一片内存,所以节省内存效率高
//但是,也正是因为这同一片内存,var obj1 = Ext.fly('id1');var obj2 = Ext.fly('id2');
//obj1.***其实是操作的obj2,因为obj1和obj2指向的内存相同,并且obj2后指向,所以容易引起问题。
</script>
</head>
<body>
<h1>Ext.get</h1>
<div id="changeDiv" style="width:200px;height:200px">
颜色变化的div
</div>
<button οnclick="changeColor();">waiting</button>
</body>
</html>
Ext.get
最新推荐文章于 2022-05-31 08:22:34 发布