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

c# - SignalR: "Protocol error: Unknown transport." when navigating to hub -

class - Kivy: how to instantiate a dynamic classes in python -

python - mayavi mapping a discrete colorbar on a surface -