作者etrexetrex (moonet)
看板Flash
标题Re: [心得] 在XML中寻找一个特定的节点
时间Wed Apr 23 23:04:54 2008
刚才测了一下 textField 的 htmlText
我给他两种case
case1:
code:
T.htmlText = "<b> this <i>is bold </b>text </i> <br> 科科";
trace(T.htmlText);
trace:(只贴重要部份)
<P><B> this </B><B><I>is bold text </I></B><B> </B></P>
<P><B> 科科</B></P>
分析:
虽然有点问题,但他变成巢状了。
<BR>变成<P>了! 0.0
case2:
code:
T.htmlText = "<aaa> this <bbb>is bold </bbb>text </aaa> <br> 科科";
trace(T.htmlText);
trace:(只贴重要部份)
<P> this is bold text </P>
<P> 科科 </P>
分析:
只要是他看不懂的 tag 全部 ignore
囧!
--
blog:
http://etrex.blogspot.com/
site:
http://web.ntust.edu.tw/~B9409041/
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 122.120.112.85
※ 编辑: etrexetrex 来自: 122.120.112.85 (04/23 23:05)
※ 编辑: etrexetrex 来自: 122.120.112.85 (04/23 23:05)
1F:推 Jerrynet:变成巢状了耶....神奇~~~~ 04/23 23:12
2F:→ Jerrynet:但是他的转换有错误,"text"就转错了 04/23 23:13
3F:→ etrexetrex:他做很多奇怪的事,像是科科也变粗了 04/23 23:28