Input Search disabled Property - Find out if a search field is disabled or not: - Javascript DOM HTML Element

Javascript examples for DOM HTML Element:Input Search

Description

Input Search disabled Property - Find out if a search field is disabled or not:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>
Search: <input type="search" id="mySearch" disabled>

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

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

<script>
function myFunction() {// www  . j  a  v  a 2s .  c o m
    var x = document.getElementById("mySearch").disabled;
    document.getElementById("demo").innerHTML = x;
}
</script>

</body>
</html>

Related Tutorials