javascript - innerHTML on keypress - cannot get content -


I have a function where the key of the key should be pressed while grabbing the inside HTML of a textile.

The function key appears to work with the press, though the following line does not return anything:

  var currentHTML = document.getElementById ("postcontent"). InnerHTML;  

What's wrong with the line, because it remains empty, I can not work.

I made a JS Bellal. Write something in the box and press Enter, you should give some console messages. You will see that Current HTML remains empty while grabbing the content.

/ P>


Comments

Popular posts from this blog

sql - Find last match with latest inserted name in table -

c# - XML serialize base class without knowing derived class -

ios - Invalid IPA: missing embedded provisioning profile. Are you sure this is an ad hoc? -