1、浏览器加载页面的时候,光标直接会在指定的文本域(如:textfield)。2、页面加载完毕了,开始做验证,当某一项验证不通过时,光标回到此文本域中。 非常感谢!!!
解决方案 »
- 导出数据时显示进度条
- 请问在JSP中如何实现两个页面的联动?
- 邮件的uid是什么,解释清楚了送高分,帮我顶的朋友也有高分相赠。
- python实战 初学者必备学习资料
- struts对多个配置文件的支持,请指教.........
- Multiple markers at this line - The method setApplicationContext(ApplicationCon
- 怎样使ie一关闭就自动删除硬盘上的某些文件?
- 请问在Tomcat下是否支持jdbc for sql server2000
- 怎么把http://localhost:8080指向自己的网页,而不是Tomcal的默认网页
- jsp用JDBC连接数据库Oracle的问题??困惑好久了
- 项目交换,谢谢
- jacob操作excel打印问题
Ext.get('id').dom.focus()
document.getElementById('').focus()
都可以
//在tbar中写一个:textfield
tbar:[
new Ext.form.Label({text:'气表编号:'}),
{
xtype:'textfield',
name:'METER_ID',
id:'METER_ID',
maxLength:20,
focus:true
},
'-',
{pressed:true,text:"查找",handler:queryFun}
],{pressed:true,text:"查找",handler:queryFun}//点击查询触发:
function queryFun(){
//通过id获取控件的值
if(Ext.getCmp("METER_ID").getValue() == ""){
Ext.Msg.alert("提示框","请填写气表编号!");
Ext.getCmp("METER_ID").focus();
Ext.get("METER_ID").dom.focus();
document.getElementById("METER_ID").focus();
}else{
Ext.Msg.alert("提示框","您填写的气表编号为:"+Ext.getCmp("METER_ID").getValue());
s();
}
}