1、设置焦点

1
$(this.getElementByXid("input1")).focus();

2、控制最大输入长度

1
$(this.getElementByXid("input1")).attr("maxlength",1);