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

Javascript examples for DOM HTML Element:Input Text

Description

Input Text autocomplete Property - Return the state of autocompletion:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

<form action="#">
  Name: <input type="text" id="myText" name="fname" autocomplete="on">
  <input type="submit">
</form>/*from w w w  .j a va 2 s  . c  o m*/

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

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

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

</body>
</html>

Related Tutorials