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

python - Strange behavior using PyQt4's 'pyqtSlot' decorator before another decorator -

c# - UnhandledExceptionMode.ThrowException for AppDomain.UnhandledException -

c# - Process.Kill() returns access denied -