<!DOCTYPE html><html><head><script>function addBorder(){document.getElementById("compman").border="2";}</script></head><body><img id="compman" src="compman.gif" alt="Computerman" width="107" height="98"><br><br><input type="button" onclick="addBorder()" value="Add border"></body></html>希望本文所述对大家的javascript程序设计有所帮助。