Please let me know how to break line in JavaScript.
<input type='submit' name='Submit' value='Submit'
onClick="parent.location='mailto:er.saurav123@gmail.com?subject=Thanks for writing to me &body=I will get back to you soon. Thanks and Regards Saurav Kumar'">
I want a break line in Subject. The output I need is:
I will get back to you soon
Thanks and Regards
Saurav Kumar
Add
%0D%0Ato any place you want to encode a line break on the URL.%0Dis a carriage return character%0Ais a line break characterThis is the new line sequence on windows machines, though not the same on linux and macs, should work in both.
If you want a linebreak in actual javascript, use the
\nescape sequence.