Forum Moderators: open
Heres the link:
<a href="mockup2.htm" id="corporateSubMenuOneActuator" class="corporatesubmenuoneactuator">Overview</a>
if (actuatorType == "linkActuator")
{
window.location = menu.url;
}
menu
How do I get the value of the links HREF?
Thanks,
Derek Basch
document.links[i].href="url";
where i is the number of the link in the array.
document.links[1].href="url"; // = mylink.com from below if those are the only links on the page or the first three.
<a href="yourlink.com">test1</a>
<a href="mylink.com">test1</a>
<a href="theirlink.com">test1</a>
Try something like this
<script>
function locateHref(arraynum){
var arraynum;
var whatHref;
whatHref = document.links[arraynum].href;
alert(whatHref);
}
</script>
<a href="yourlink.com" onclick="locateHref(0)">test1</a>
<a href="mylink.com" onclick="locateHref(1)">test1</a>
<a href="theirlink.com" onclick="locateHref(2)">test1</a>