954,597 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

change link border with js

Hi

I need to set the border width of a link when it is clicked. The link calls a javascript and so I need a way to identify which link has been clicked, hence the outline...

i tried

this.style.borderWidth = 'thin';


but to no avail...?!

I have already assigned border-color and border-style in the style sheet if that makes any difference...

lifeworks
Junior Poster
145 posts since Nov 2007
Reputation Points: 15
Solved Threads: 2
 

Try

<a href="#" onclick="this.style.border='thin black solid';return false;">Click me!</a>
codejoust
Junior Poster
180 posts since Jul 2009
Reputation Points: 18
Solved Threads: 21
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You