why is simple javascript code not running ?
<script type="text/javascript" charset="utf-8">
var btn = document.getElementById("myBtn");
btn.onclick = function(){
alert("Clicked");
};
</script>
<a id="myBtn" href="#">click me </a>
See Question&Answers more detail:os