Javascript examples for DOM HTML Element:Input Text
Delete value of search bar text input when clicked
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript"> function searchbarClicked() {//w ww .j a v a 2 s . c o m document.getElementById('searchbar').value = ''; } </script> </head> <body> <input type="text" id="searchbar" name="searchbar" value="search..." onclick="searchbarClicked()"> <input type="submit" value="Search" name="search"> <br> </body> </html>