html - How to give space or next line feature in javascript? -


here java script code:

function for_approve(){ var approve = confirm(format_stock_id.length +                 "&nbsp;stock record(s) selected approval.<br />                 want send approval");  } 

it gives me result as:

3 &nbsp;stock record(s) selected approval.<br />do want send approval 

what should space , new line.

use \n symbol:

function for_approve(){ var approve = confirm(format_stock_id.length +                 " stock record(s) selected approval.\n                 want send approval");  } 

you can check right here. open console in browser , write: alert("bob\nbob");

example

command:

command

result:

example

p.s.: same space. don't have use escape-query &nbsp;. use (simple space).


Comments

Popular posts from this blog

jQuery Mobile app not scrolling in Firefox -

c++ - How to add Crypto++ library to Qt project -

php array slice every 2th rule -