DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> </head> <body> <form> <label for="firstname">first name: </label><input type="text" id="firstname" name="fname" autocomplete="given-name"> <br> <label for="lastname">last name: </label><input type="text" id="lastname" name="lname" autocomplete="family-name"> <input type="submit"> </form> </body> </html> input2.html: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Document</title> </head> <body> <form> <label for="firstname">first name: </label><input type="text" id="firstname" name="firstname" autocomplete="given-name"> <br> <label for="lastname">last name: </label><input type="text" id="lastname" name="lastname" autocomplete="family-name"> <input type="submit"> </form> </body> </html> here if i filled form in input1.html and then open input2.html - no suggetions but if i changed name of input2.html to fname and lname then i will suggestions. what is the role of autocomplete here. i better use autocomplete=on then why we need other values i am using this in google chrome
HTML attribute: autocomplete - HTML: HyperText Markup Language | MDN[^]: "on" The browser is allowed to automatically complete the input. No guidance is provided as to the type of data expected in the field, so the browser may use its own judgement.
"on"
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)