作者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)
推 Jerrynet:變成巢狀了耶....神奇~~~~ 04/23 23:12
→ Jerrynet:但是他的轉換有錯誤,"text"就轉錯了 04/23 23:13
→ etrexetrex:他做很多奇怪的事,像是科科也變粗了 04/23 23:28