I am trying to do that by adding a javascript in the properties box of the link in adobe acrobat 7.0, but I don't know how the script should be written.
You could do this if you used a button instead of a link annotation and used the following for the button's Mouse Up event:
// Change this button's border color to red when clicked
event.target.strokeColor = color.red;
For other colors, see: http://livedocs.adobe.com/acrobat_sdk/9.1/Acrobat9_1_HTMLHelp/JS_API_A croJS.88.261.html
North America
Europe, Middle East and Africa
Asia Pacific