Javascript to open url on body load

I need a javascript example that shows how to 'click an anchor tag' on body load

any ideas?
LVL 1
addicktzAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
hieloConnect With a Mentor Commented:
give your anchor and id and a tabindex=-1:
<a name="myAnchor" id="myAnchor" tabindex="-1"></a>
 
<script>
window.onload=function(){
  document.getElementById("myAnchor").focus()
}
</script>

Open in new window

0
All Courses

From novice to tech pro — start learning today.