Cam*_*lis 25 apache-flex textarea actionscript-3
我有一个字符串
var s:String = "This is a line \n This is another line.";
this.txtHolder.text = s; //.text has \n, not a new line
Run Code Online (Sandbox Code Playgroud)
我想将它放入文本区域,但忽略新的行字符.我怎样才能确保文本在分配时打破我想要的位置?
小智 44
在flex上,虽然编码\n工作正常mxml或任何xml定义一行只是使用
行实体.
我的意思是:
lazy
fox
Run Code Online (Sandbox Code Playgroud)
给我们
lazy<br />
fox
Run Code Online (Sandbox Code Playgroud)
@radekg
OP指的是用MXML语法编写的文本字符串:
<mx:TextArea text="This is a new line" />
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
60453 次 |
| 最近记录: |