I want to write a function that surrounds an image with a border frame each time i click on it. unf. i can't make it work. deny any typos cause i didn't copy paste it. the function works. but no affect is being made on the image when clicking on it. did i access the border attribute right?
my function:
<script>
function mark(imageId) {
document.getElementById(imageId).style.border = "1";
}
</script>
my html body:
<input id="imageId" src="\images\image1.png" onclick="mark(imageId)"/>