Created a local variable and output the resulting html entity, but returns null . What's the catch? I did the same thing outside self-calling, the same thing.
(function(){ var elem = document.getElementById('js_elem'); // инпут на странице с таким айди console.log(elem); })();
null) is. Magic, cho! - user207618