Ext.MessageBox
这是一个简单的messagebox,如有建设意见请留言,谢谢
<link rel="stylesheet" href="ext-3.2.1/resources/css/ext-all.css"/>
<script type="text/javascript" language="javascript" src="ext-3.2.1/adapter/ext/ext-base.js"></script>
<script type="text/javascript" language="javascript" src="ext-3.2.1/ext-all.js"></script>
<script type="text/javascript" language="javascript" src="ext-3.2.1/examples/shared/examples.js"></script>
<script type="text/javascript">
Ext.onReady(function(){
Ext.MessageBox.alert('提示','你好ExtJs');
Ext.Msg.show({
title:'提示',
msg:'此操作无法回退,是否继续',
buttons:Ext.Msg.YESNO,
fn:function(btnId,text,opt){
if(btnId=="yes"){
Ext.DomHelper.insertHtml('beforeEnd',Ext.getBody().dom,"您选择了继续操作")
}else{
Ext.DomHelper.insertHtml('beforeEnd',Ext.getBody().dom,"取消操作")
}
},
icon:Ext.Msg.WARNING
});
});
</script>
二、带输入栏的messgebox
<script type="text/javascript">
Ext.onReady(function(){
Ext.MessageBox.alert('提示','你好ExtJs');
Ext.Msg.show({
title:'提示',www.zzzyk.com
msg:'你的姓名是:',
buttons:Ext.Msg.OK,
prompt:true,
fn:function(btnId,text,opt){
Ext.DomHelper.insertHtml('beforeEnd',Ext.getBody().dom,"dsfsdfsf"+text);
},
icon:Ext.Msg.QUESTION,
width:300
});
});
</script>
补充:web前端 , JavaScript ,