-1

How to get auto filled values at page load. I have tried to get password field value at window load function. But it returns empty. How and when will i get auto filled value of input field in javascript. Please help me to resolve this.

$(window).load(function () {    
if ($(".username").val() !== "" || $(".password").val() !== "") {
   alert("test");
}

});

Thanks in advance.

Community
  • 1
  • 1

1 Answers1

0

try document ready method instead of window load

Indranil
  • 57
  • 4
  • Added my code. in this case, by opening console and while debug username can able to get but password value not returning anything. – Rahini Krishna Aug 08 '17 at 06:57