If I use jQuery's .append() with a string that has leading spaces, it skips the spaces.
Example: $("#div").append(" test");
appends test
without the four spaces that are in front of it.
How would I allow the appending of leading spaces?
Are you expecting to see the white space on the page? if so, you need to use
s or non-breaking spaces.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.