input标签触发失去焦点之后,密码不正确,如何再次获得焦点

 <li>
                 <label class="label">原密码:<span>*</span></label>
                   <div class="fc">
                    <input name="Opwd" type="password" maxlength="40" class="iText required" id="Opwd" onblur="pass1()" /><span class="tips"></span>
                    </div>
               </li>

                        原密码如果不正确,怎么能够再次获得焦点

有focus()方法啊,e.g.:\
jQuery版本:

$("#password").focus();

原生js版本
document.getElementById("password").focus();

使用jQuery:
$(function(){
$("#password").focus();
});


$(function(){ $('#pwd').blur(function(){ if($(this).val().length==0){ console.log("请输入密码"); $("#pwd").focus();//绑定焦点 }else{ console.log("成功"); } }); })

如果密码不正确时,$("#password").focus();

http://www.w3school.com.cn/

当密码不正确时,用focus去获取焦点