
1//EditText有焦点阻止输入法d出
2 editTextsetOnTouchListener(new OnTouchListener() {
3
4 public boolean onTouch(View v, MotionEvent event) {
5 // TODO Auto-generated method stub
6 //记住EditText的InputType现在是password
7 int inType = editTextgetInputType(); // backup the input type
8 editTextsetInputType(InputTypeTYPE_NULL); // disable soft input
9 editTextonTouchEvent(event); // call native handler
10 editTextsetInputType(inType); // restore input type
11 editTextsetSelection(editTextgetText()length());
12 return true;
13
14 }
15 });
UsetheCWnd::DestroyWindowfunctiontodestroyadialogboxcreatedbytheCreatefunction模态对话框可以定义为局部的,非模态的最好是定义成全局的,如果你创建的对话框较多,可以用数组去管理。在不需要用到的时候,调用DestroyWindow去销毁对话框。如果你用局部对象去创建非模态对话框的话,会造成内存泄露。
var userName = $("#userName")val();
var userPwd = $("#userPwd")val();
//$("#userName,#userPwd")textbox({ required: true });
if (!userName) {
$messageralert("", "账号不为空!", null, function () {
$("#userName")focus();
});
return;
}
if (!userPwd) {
$messageralert("", "密码不为空!", null, function () {
$("#userPwd")focus();
});
return;
}
以上就是关于如何屏蔽EditText自动获取聚焦时d出输入框全部的内容,包括:如何屏蔽EditText自动获取聚焦时d出输入框、怎样去掉非模态对话框自动获得焦点、jquery easyui $.messager.alert 怎么不自动获得焦点等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)