摘自: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"));