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

winforms - C# Form - Property Change -

java - Messages from .properties file do not display UTF-8 characters -

javascript - amcharts makechart not working -