请帮助我解决此问题,我有一个页面,该页面具有某些形式的验证 当您加载页面时,光标会自动进入密码字段,这对我来说是一个hack,请帮助我。
答案 0 :(得分:0)
您在下面的JS文件中有一个代码,该代码将inputPassword ID集中在 $(document).ready(function(){...}):
https://mobulous.app/healthapp/public/assets/js/custome.js
代码:
$(document).ready(function(){
$("#inputPassword").focus();
$("#pwchecknext").click(function(){
if ($("#pwchecknext").is(":checked"))
{
$(".oppwasconf").clone()
.attr("type", "text").insertAfter(".oppwasconf")
.prev().remove();
}
else
{
$(".oppwasconf").clone()
.attr("type","password").insertAfter(".oppwasconf")
.prev().remove();
}
});
});
您需要删除此 $(“#inputPassword”)。focus(); ,以免重新加载密码时自动聚焦。
答案 1 :(得分:0)