'onClick' Example : onClick « Event onMethod « JavaScript DHTML






'onClick' Example

   
    
<html>
<body>
<input type="text" 
       name="textfield" 
       onclick="alert('You clicked an input text field')" 
       value="Click me">
</body>
</html>

    
      
        
    
    
  








Related examples in the same category

1.Anchor onclick event
2.Put all your JavaScript statement in onclick clause
3.Running a Script from User Action
4.Add document onclick event handler