how to change button image by javascript
<p>I have 2 button and i want to change background image of that button which is clicked.</p>

<pre><code>&lt;input style="float:right; padding-right:10px;" name="comp_sephora" id="comp_sephora" type="submit" value="Sephora" onClick="change(this.style);"&gt;

&lt;input style="float:right;" type="submit" name="comp_bloom" id="comp_bloom" value="Bloom" onClick="change(this.style);"&gt;
</code></pre>

<p>i have used javascript function for that:</p>

<pre><code>function change(style)
{
    //alert(val);
    style.backgroundImage = "url(&lt;?php echo  IMAGES."btn1.bmp"; ?&gt;)";
    //style.color = "#000000";
}
</code></pre>

<p>but when i was clicked then image changed for only few seconds. i want to maintain that image after page reload.</p>
