convertFromHTML 技巧,使用动态文本框

      网摘 2006-4-20 9:18

摘自:http://www.darronschall.com/weblog/archives/000140.cfm

function convertFromHTML(the_string) {
    createTextField("converter_txt", getNextHighestDepth(), 0, 0, 0, 0);
    converter_txt.html = true;
    converter_txt.htmlText = the_string;
 
    // store the text so it doesn't get lost when we remove the
    // text field
    var txt = converter_txt.text;
    converter_txt.removeTextField(); // clean up
    return txt;
}
// usage:
trace(convertFromHTML("This is some <html> escaped text & stuff"));

标签集:TAGS:
回复Comments() 点击Count()

回复Comments

{commentauthor}
{commentauthor}
{commenttime}
{commentnum}
{commentcontent}
作者:
{commentrecontent}