Form autocomplete Property - Return the state of autocompletion: - Javascript DOM HTML Element

Javascript examples for DOM HTML Element:Form

Description

Form autocomplete Property - Return the state of autocompletion:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

<form id="myForm" action="#" autocomplete="on">
  First name:<input type="text" name="fname"><br>
  E-mail: <input type="email" name="email"><br>
  <input type="submit">
</form>//from w  ww  . j av a2s. c o m

<button onclick="myFunction()">Test</button>

<p id="demo"></p>

<script>
function myFunction() {
    var v = document.getElementById("myForm").autocomplete;
    document.getElementById("demo").innerHTML = v;
}
</script>

</body>
</html>

Related Tutorials