简体   繁体   中英

How to split HTML P tag content by line without line break

When the content exceeds the tag width, the content will auto break into new line. How to split the tag content by line?

Expect Result: each line content Same question but not solved: Read text within an HTML <p> tag line by line in JavaScript

Just a javascript alternative document.getElementById('P TAG').innerHTML+="\n your text"

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM