/**
updateText([String text])
text: 可选参数,显示的信息内容
*/
<script type="text/javascript">
Ext.onReady(function(){
var msgBox = Ext.MessageBox.show({
title: '提示',
msg: '动态更新的信息文字',
modal: true,
width: 180,
buttons: Ext.Msg.OK
});
//msgBox.updateText("I'm Pig");
Ext.TaskMgr.start({
run:function(){
msgBox.updateText(new Date().format('Y-m-d g:i:s A'));
},
interval:1000
});
});
</script>
动态更新对话框中的提示文字
最新推荐文章于 2020-08-07 16:05:13 发布
本文展示了一个使用Ext.MessageBox组件实现实时动态更新文本的消息框示例。通过Ext.TaskMgr设置定时任务,每秒更新消息框内的文本为当前日期及时间。
2879

被折叠的 条评论
为什么被折叠?



