+ 1
How to create button with img?
4 Respuestas
+ 1
<button>
<img src="some_image_source" alt="image"/>
</button>
+ 1
<img src=“image.type” onclick=“javaScriptFunction()”>
</img>
Basically assigning an onclick event procedure to an image tag.
0
<img onclick="YOUR JS">
0
Inside the image tag put the name of a function, then create the function in Javascript. After that just write what you want the button to do. This may be unclear but I hope it helps a little.
<img src="your pic" onclick="function()">
<script>
function function(){
//add what you want the button to do
}