I have a static HTML that I generate using a script.
My hyperlinks in the HTML look like this:
<a href="corners/xyz.csv">Data</a>
They corners directory is present in the same directory where the HTML resides. When I open this using my browser, the browser resolves the URL which becomes something like:
/home/user/blah/blah1/corners/xyz.csv
I want to use the href value in some part of my javascript function. When I do getElementsByTagName("a")[0]
i get the entire resolved URL.
But, all I want is corners/xyz.csv
Is there a way to get the text that is present in the href tag without resolving it ?