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

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

gtk - Python Window Resize -

c# - read full xml file data over tcp -