html - How to pass link name in javascript? -
in code below need pass link name inorder process in javascript. don't know how pass link name in javascript. tries passing this.value, this.innerhtml no luck. please can this.
<li><a href="#tab6" onclick="hideupdatebutton(this)">images</a></li>
try this
function hideupdatebutton(el) { console.log(el.innerhtml); }
<ul> <li><a href="#tab6" onclick="hideupdatebutton(this)">images</a></li> </ul>
or can pass text,
function hideupdatebutton(name) { console.log(name); }
<ul> <li><a href="#tab6" onclick="hideupdatebutton(this.innerhtml)">images</a></li> </ul>
Comments
Post a Comment