This article describes the common methods used to implement button plus background images in js. Share it for your reference. The specific implementation method is as follows:
Method 1:
Copy the code as follows:<input type="submit" onMouseOver="style=background:url('imgs/jb51.gif')"/>
Method 2:
The code copy is as follows: <input type="button" value="submit" style="background:url(image address) no-repeat;border:none;text-indent:-2000px;width:100px;height:30px;">
Method 3:
It is to use the picture button, that is:
Copy the code as follows:<input name="submit" type="image" value=" " src="jb51.jpg" />
I hope that the description in this article will be helpful to everyone's web programming based on javascript.