+ 1
what is the error?
the code: <!DOCTYPE html> <html> <head> <script> while(true){ var box = getElementById('text'); var input = getElementById('in') var text = box.val(); text.innerHTML(input.charCodeAt()); } </script> </head> <body> <textarea id="in" style="margin: 0px; width: 1182px; height: 253px;"></textarea> <br> <textarea id="text" style="margin: 0px; width: 1181px; height: 60px;"></textarea> </body> </html> it says Uncaught ReferenceError: getElementById is not defined Line: 3
5 Respuestas
+ 3
Remember the ; behind too
+ 2
it should be document.getElementById('text')
and
document.getElementById('in')
+ 2
@Li PLEASURE.
+ 1
thanks
+ 1
@$ I don't think it is necessary for JS