SyntaxFix
Write A Post
Hire A Developer
Questions
as your lol is local variable now, its good practice to use var keyword for declaring any variables.
this may work for you :
function kk(){ var lol = document.getElementById('lolz').value; alert(lol); }