尝试了一下, Ext.MessageBox.alert("hello","Hello, everybody haha!",function(){ Ext.MessageBox.prompt("user name please","username",)到这里我还明白,可是后来的,function(v,name){Ext.MessageBox.alert("your name", name); 是什么道理呢?另外我运行不通。还请sohighthesky指教!感谢!
好了,是我错了。冒冒失失的写成 var name = function(){Ext.Msg.prompt(......., function(v,name){....})} 了。我想,可能就是因为套用在第二个function里的话,他的返回值就可以直接用到第3个function只不过,设置一个变量就行,多变量的话,就多个变量x,y,z什么的。感谢 sohighthesky!!!
这个问题我也调查过,跟你一起等待结果。期待高手
Ext.MessageBox.alert("hello","Hello, everybody haha!",function(){
Ext.MessageBox.prompt("user name please","username",function(v,name){
Ext.MessageBox.alert("your name", name);
});
});
系统自带的alert和prompt会阻塞线程,所以会按顺序,而你自己写的,不可能阻塞线程,所以只能在回调函数中写
Ext.MessageBox.alert("hello","Hello, everybody haha!",function(){
Ext.MessageBox.prompt("user name please","username",)到这里我还明白,可是后来的,function(v,name){Ext.MessageBox.alert("your name", name); 是什么道理呢?另外我运行不通。还请sohighthesky指教!感谢!
了。我想,可能就是因为套用在第二个function里的话,他的返回值就可以直接用到第3个function只不过,设置一个变量就行,多变量的话,就多个变量x,y,z什么的。感谢 sohighthesky!!!