+ 1

How to create button with img?

4th Apr 2018, 5:51 PM
Илья Гамзаев
Илья Гамзаев - avatar
4 odpowiedzi
+ 1
<button> <img src="some_image_source" alt="image"/> </button>
4th Apr 2018, 6:18 PM
777
777 - avatar
+ 1
<img src=“image.type” onclick=“javaScriptFunction()”> </img> Basically assigning an onclick event procedure to an image tag.
8th Apr 2018, 2:35 PM
Connor Q. Hudson
Connor Q. Hudson - avatar
0
<img onclick="YOUR JS">
4th Apr 2018, 6:01 PM
Chalza
Chalza - avatar
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 }
5th Apr 2018, 12:53 AM
Babydoll Scripts
Babydoll Scripts - avatar