<script type="text/javascript">
Ext.get("btn1").on(
"click",
function(){
Ext.MessageBox.show({
title:"时间进度条",
msg:"5s 后关闭进度框",
progress:true,
width:300,
wait:true,
waitConfig:{interval:600},//0.6s 进度条自动加载一定长度
closable:true
});
setTimeout(function(){Ext.MessageBox.hide()},5000);
});
</script>
</head>
<body>
<input id="btn1" type="button" value="点我"/>
</body>
包应该是没问题的,请告诉我哪里写错了
编程语言
https://fiddle.sencha.com/#fiddle/5kn
就是这个例子
找不到控件了,放入Ext.onReady中,要不你的代码放到btn1控件下,还有ext路径你搞对了没有,是否正确导入ext
Ext.onReady(function () {
Ext.get("btn1").on(
"click",
function () {
Ext.MessageBox.show({
title: "时间进度条",
msg: "5s 后关闭进度框",
progress: true,
width: 300,
wait: true,
waitConfig: { interval: 600 },//0.6s 进度条自动加载一定长度
closable: true
});
setTimeout(function () { Ext.MessageBox.hide() }, 5000);
});
});