<html> <body> <img id="myImage" src="http://www.java2java.com/style/logo.png"> <button onclick="myImage.border = 15;">Add a border</button> <button onclick="myImage.border = 0;">Remove border</button> </body> </html>