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

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -