Last post Oct 13, 2017 02:10 AM by Eric Du
Oct 12, 2017 06:09 AM|hkbeer|LINK
I have this JS and the alert gives the result in several lines based on "\n" as desired
alert(selected1 + "\n" + selected2);
Now I change to use model instead of
var modalMsg = selected1 + "\n" + selected2 ;
There is no line break between selected 1 and selected2 when displaying, pls help what do I need to do to display the line break.
Oct 12, 2017 11:09 AM|hkbeer|LINK
I changed text into html then it works.
Oct 13, 2017 02:10 AM|Eric Du|LINK
According to your description and needs, if you want to show break line in alert message, please check the following code:
alert("Line 1\nLine 2");