Why does code playground throw an error stating "cannot set property 'innerHTML' of null" it works on my txt editor [Android]?
Is there a work around for this? The code is as follows there may still be errors the code is public on my profile: <html> <head> <style> body { background-color: black; color: green; } </style> <script type="text/javascript"> alert("This is your current [Password]"); function scroll(position) { var passScroll = "This is a sampleThis is a sample This is a sample"; var out = ""; var sc = document.getElementById('pswScroller'); for(i = 0; i < position; i++) { out += passScroll.charAt(i); } out += passScroll.charAt(position); sc.innerHTML = out; position++; if (position != passScroll.length) { window.setTimeout(function() { scroll(position); }, 50); } else { window.setTimeout(function() { scroll(0);}, 30000); } } scroll(0); 8 </script> </head> <body> <p id="pswScroller"></p> </body> </html>