javascript - can I use document.getElementById(someid).onclick for tag a -


I'm trying to call a JavaScript function onclock. I have written something like

   

I am trying to call the readPage function but is not working? If I click on the tag then it works , But as I have written above, it is not working. Why?

Nothing is wrong, but when you load the dome before The easiest thing to do is to run the code in the window. Load it like this:

  window.onload = function (). GetElementById ('read'). Onclick = readpage;}  

Comments

Popular posts from this blog

paypal - How to know the URL referrer in PHP? -

oauth - Facebook OAuth2 Logout does not remove fb_ cookie -

wpf - Line breaks and indenting for the XAML of a saved FlowDocument? -