日期:2014-05-17  浏览次数:20682 次

将前台HTML页面转义为普通的html文本
Use YUI get the element.
var summaryAreaElement = get('summaryArea');
var summaryAreaValue=summaryAreaElement.value;
summaryAreaValue=summaryAreaValue.replace(/>/g,">");
summaryAreaElement.value=summaryAreaValue.replace(/</g,"&lt;");