当字符串中包含html标签,怎么避免标签匹配混乱? 100分,谢谢
<script language='javascript'>
function preview(str){
xxWin=window.open('','newwindow','height=450,width=550,top=0,left=0,toolbar=no,menubar=no,scrollbars=yes, resizable=yes,location=no, status=no');
xxWin.document.write(str);
xxWin.document.close() ;
}
</script>
当str变量中的字符串包含html标签的时候,会产生标签匹配混乱的问题,用replace()也不能很好的解决.怎么做?????????