Javascript examples for DOM HTML Element:Input Search
Input Search size Property - Display the width of a search field in number of characters
<!DOCTYPE html> <html> <body> Search: <input type="search" id="mySearch" size="35"> <button onclick="myFunction()">Test</button> <p id="demo"></p> <script> function myFunction() {/* w ww. j a v a 2 s . co m*/ var x = document.getElementById("mySearch").size; document.getElementById("demo").innerHTML = x; } </script> </body> </html>