你按按钮的时候,鼠标应该就在按钮上,那么

<input type="button" name="click" value="image" onclick="this.style.background='url(../images/gooda.gif)'">