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

Javascript examples for DOM HTML Element:Input Search

Description

Input Search autocomplete Property - Return the state of autocompletion:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

<form action="#">
  Search: <input type="search" id="mySearch" name="search" autocomplete="on">
  <input type="submit">
</form>/*from   w w  w.java2s .  c o m*/

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

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

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

</body>
</html>

Related Tutorials