Skip to content Skip to sidebar Skip to footer

Right Click On Html Link Which Execute Javascript

When i click a link, i want to execute a javascript function to get the dynamic url. So i did like below. a link With this code

Solution 1:

Short answer: No, you can't.

But since you are using JS anyways, you can just use it to change the href attribute in <a, so by the time the user clilcks on the link, it's already pointing to the right URL.

Post a Comment for "Right Click On Html Link Which Execute Javascript"