Javascript examples for DOM HTML Element:Input Search
Input Search readOnly Property - Find out if a search field is read-only or not:
<!DOCTYPE html> <html> <body> Search: <input type="search" id="mySearch" readonly> <button onclick="myFunction()">Test</button> <p id="demo"></p> <script> function myFunction() {//w ww .j av a 2 s .c om var x = document.getElementById("mySearch").readOnly; document.getElementById("demo").innerHTML = x; } </script> </body> </html>