How to output spaces in JS? -PHP Chinese website Q&A-How to output spaces in JS? -PHP Chinese website Q&A
Please watch and learn.
document.write("<span style='white-space:pre;'>"+" 1 2 3 "+"</span>"); 结果: 1 2 3
使用输出html标签 来解决
document.write(" "+"1"+" "+"23"); 结果: 1 23
How to output spaces in JS? -PHP Chinese website Q&A-How to output spaces in JS? -PHP Chinese website Q&A
Please watch and learn.
document.write("<span style='white-space:pre;'>"+" 1 2 3 "+"</span>");
结果: 1 2 3
使用输出html标签 来解决