Reset <input type="email"> to blank - Javascript DOM HTML Element

Javascript examples for DOM HTML Element:Form Event

Description

Reset <input type="email"> to blank

Demo Code

ResultView the demo in separate window

<html>
   <head> 
      <meta name="viewport" content="width=device-width, initial-scale=1"> 
   </head> 
   <body> 
      <input type="email" id="abc"> 
      <input type="button" onclick="clickme()" value="go"> 
      <script type="text/javascript">
function clickme(){//  w w  w  .ja va 2 s. c  om
   document.getElementById("abc").value="";
}

      </script>  
   </body>
</html>

Related Tutorials