<html> <body> <img id="myImage" src="yourimage.gif"> <button onclick="myImage.border = 15;">Add a border</button> <button onclick="myImage.border = 0;">Remove border</button> </body> </html>