CSS has a “starts with” function for links:
a[href^=”
The above line reads: “If the link starts with the URL
That’s fine to use if I want to STYLE a link in a certain way depending on what the link starts with, but if I want the link to BEHAVE in a different way depending on what that link starts with, I cannot use a Cascading STYLE Sheet, I must use JavaScript.
Does anyone know if JavaScript has a similar function that allows me to make a link behave in a certain way depending on what it starts with??? For example, I might want the link to open in a certain frame or new window.
Thank you for your help.