How to br in javascript after some character??DVdip vyas7yAsked Jun 2, 2019, 11:37 PM EDTSolvedShareLinkedInXCopy linkSavelinebreak after some character
How to br in javascript after some character??DVdip vyas7yAsked Jun 2, 2019, 11:37 PM EDTSolvedShareLinkedInXCopy linkSavelinebreak after some character
Gajendra JangidRank #157 · 14.9K reputation7y agoPosted Jun 3, 2019, 8:47 PM EDT✓ Accepted answer+1hello dear, try this code: Input your age and click the button: "inp" value="" maxlength="10" /> "myFunction()">Try it "demo"> +1
Sanwar RanwaRank #23 · 44.7K reputation7y agoPosted Jun 2, 2019, 11:42 PM EDT+1Hello dip Please check these Links https://stackoverflow.com/questions/17895039/how-to-insert-line-break-after-every-80-characters http://jennifermadden.com/javascript/lineBreaks.html +1
Sanwar RanwaRank #23 · 44.7K reputation7y agoPosted Jun 3, 2019, 12:03 AM EDT+1share your code where its not working+1
Gajendra JangidRank #157 · 14.9K reputation7y agoPosted Jun 3, 2019, 7:21 PM EDT+1hello dear , try following: var ele = document.querySelector('.break-field'); ele.innerHTML = ele.innerHTML.replace(/,/g, ',') +1
Rajeesh MenothRank #118 · 18.4K reputation7y agoPosted Jun 3, 2019, 8:55 PM EDT+1Hi, Please try thi code :var content = div.innerText; content.replace(/(.{10})/g, "$1"); Reference : https://stackoverflow.com/questions/17895039/how-to-insert-line-break-after-every-80-characters Demo : http://jsfiddle.net/x2YJp/ +1
DVdip vyasRank #8,369 · 223 reputation7y agoPosted Jun 2, 2019, 11:50 PM EDT0i try it but not working0
DVdip vyasRank #8,369 · 223 reputation7y agoPosted Jun 3, 2019, 12:20 AM EDT0 this is my code i need br after 10 character in div0DVdip vyasRank #8,369 · 223 reputation7y agoPosted Jun 3, 2019, 7:42 PM EDT0Gajendra Jangid it's not working0Join to answer this questionEvery answer you publish earns 20 SHARP.Create free accountSign inKnow the answer?Answer a question in the forums and earn +20 SHARP for every answer.See unanswered questionsForumsTop experts01Arun PottiAnswers in the forums20answers02Tahir AnsariAnswers in the forums5answers03Kamlesh KumarAnswers in the forums5answers04Sam HobbsAnswers in the forums4answers05Željko PerićAnswers in the forums3answers?YouYour name goes here.Every answer: 20 SHARP.JoinFull leaderboard →2026DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
DVdip vyasRank #8,369 · 223 reputation7y agoPosted Jun 3, 2019, 7:42 PM EDT0Gajendra Jangid it's not working0
Gajendra JangidRank #157 · 14.9K reputationPosted Jun 3, 2019, 8:47 PM EDT
Input your age and click the button:
"demo"
>Sanwar RanwaRank #23 · 44.7K reputationPosted Jun 2, 2019, 11:42 PM EDT
Sanwar RanwaRank #23 · 44.7K reputationPosted Jun 3, 2019, 12:03 AM EDT
Gajendra JangidRank #157 · 14.9K reputationPosted Jun 3, 2019, 7:21 PM EDT
')
Rajeesh MenothRank #118 · 18.4K reputationPosted Jun 3, 2019, 8:55 PM EDT
");
dip vyasRank #8,369 · 223 reputationPosted Jun 2, 2019, 11:50 PM EDT
dip vyasRank #8,369 · 223 reputationPosted Jun 3, 2019, 12:20 AM EDT
dip vyasRank #8,369 · 223 reputationPosted Jun 3, 2019, 7:42 PM EDT
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questionsTop experts