title: How to run the javascript fn using OnClick button event (asp.net)
body: <p>I had a input button to which I called a javascript function when clicked. But I want to add images to the button So I used a Image button but I am not able to call the Javascript function from the image button. How to run the javascript fn when the image button is clicked </p>
  
  <pre><code>&lt;input id="send" type="button" value=" Preview on iPhone " onclick="javascript:preview()"&gt;
  
  
     &lt;asp:ImageButton  OnClick="preview()"  ID="send" runat="server" ImageUrl="Styles/Images/preview_iphone.png"
                                       OnMouseOut="this.src='Styles/Images/preview_iphone.png'"
                                      OnMouseOver="this.src='Styles/Images/preview_iphone_over.png'" /&gt;
  </code></pre>