Javascript examples for DOM Event:onsearch
Execute a JavaScript when submitting a search:
<!DOCTYPE html> <html> <body> <input type="search" id="myInput" onsearch="myFunction()"> <p id="demo"></p> <script> function myFunction() {//from w ww. j a v a 2 s .co m var x = document.getElementById("myInput"); document.getElementById("demo").innerHTML = "You are searching for: " + x.value; } </script> </body> </html>