HTML input fields does not get focus when clicked

后端 未结 27 2044
予麋鹿
予麋鹿 2020-12-08 06:11

I have a problem and I can\'t figure out what exactly is causing this behavior. I cannot access my input fields and textareas on my HTML form.

Unfortun

27条回答
  •  眼角桃花
    2020-12-08 06:25

    I had the similar issue - could not figure out what was the reason, but I fixed it using following code. Somehow it could not focus only the blank inputs:

    $('input').click(function () {
            var val = $(this).val();
            if (val == "") {
                this.select();
            }
        });
    

提交回复
热议问题