var input;
// method 1
input = document.getElementById('address').value;
alert(input)
// method 2
eval('input = "'+document.getElementById('address').value+'"')
alert(input)
method 1 is working fine, but method 2 is not working when newline characters are inputted and it says "unterminated string literal".
I need to store values using eval anyway. So please help me.