<p>string strtext = this.textbox1.text.trim().<span style="color: #0000ff;">replace(system.environment.newline, "<br>");</span></p><p>this.label1.text = strtext;</p><p>this.textbox2.text = strtext.replace("<br>",system.environment.newline);</p><p><br>//str = str.replace("'", "''").replace(">", ">").replace("<", "<").replace("and", "").replace("exe", "");</p>
multiline textbox 多行文本框的换行内容 在label上换行显示
最新推荐文章于 2025-01-23 15:50:41 发布
本文介绍了一种在编程中处理文本替换的方法,通过使用不同的字符或字符串进行替换,可以在界面上实现文本到HTML格式的转换,以及从HTML格式还原为原始文本。具体地,文章展示了如何将文本框中的内容转换为包含<br>换行标签的HTML文本,并再次将其转换回原始文本的过程。
1141

被折叠的 条评论
为什么被折叠?



