Jdidhs
0
Q:

onclick on anchor tag

<a href='more.php' onclick='show_more_menu()'>More >>></a>
1
<a href='http://www.google.com' onclick='return check()'>check</a>

<script type='text/javascript'>
function check() {
    return false;
}
</script>
3
<a href="javascript:show_more_menu();">More >>></a>
0
<button onclick="myFunction()">Try it</button>

<script>
function myFunction() {
  var x = document.createElement("A");
  var t = document.createTextNode("Tutorials");
  x.setAttribute("href", "https://www.w3schools.com");
  x.appendChild(t);
  document.body.appendChild(x);
}
</script>
0

New to Communities?

Join the community