aritroper aritroper - 6 months ago 43
Javascript Question

Print Var in JsFiddle

How would I print something to the result screen in JsFiddle from my JavaScript. I can't use document.write(), it doesn't allow it -- neither print -- what do I use?

Answer

Try:

document.getElementById('element').innerHTML = ...;

Fiddle: http://jsfiddle.net/HKhw8/