Want to change image src of ImageButton using javascript on client click
<p>I tried this first which is not working:</p>

<pre><code>&lt;asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="minus.gif" OnClientClick="this.src='plus.gif';"/&gt;
</code></pre>

<p>Another method:</p>

<pre><code>&lt;asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="minus.gif" OnClientClick=" return changeImg(this)"/&gt;    

 function changeImg(cnt)
    {
    if(cnt.src='minus.gif')
    {
    cnt.src='plus.gif';
    }
    else
    {
    if(cnt.src='plus.gif')
    {
    cnt.src='minus.gif';
    }
    }
    return false;
    }
    &lt;/script&gt;
</code></pre>
