login I would like click in "login", but i don't how to reach this element using javascript. Is..." /> login I would like click in "login", but i don't how to reach this element using javascript. Is..." /> login I would like click in "login", but i don't how to reach this element using javascript. Is..."/>

How can i get element by href using javascript and after that, click?

60 views Asked by At

Hi i have this situation:

href="javascript:void(0);">login

I would like click in "login", but i don't how to reach this element using javascript. Is it possible?

Thaks

1

There are 1 answers

1
idoberko2 On

Why don't you give it an id, like <a href="javascript:void(0);" id="btn_login">Login</a> and then referring it simply by document.getElementById('#btn_login')?