<script language=javascript>
function BorderChange(bordersize)
{
document.getElementById('borderchange').border=bordersize
}
</script>
<img src="test.gif" width="30" height="50" border="0" id="BorderChange" onclick="javascript:BorderChange(3)">
BorderChange(3)中3做参数,要设置变多少在这里就行了。