js读取html时转编码

$html = str_replace(array("\r", "\n"), array('', '\n'), addslashes($html));
        header("Content-type: text/html; charset=gb2312"); 
        echo '<script type="text/javascript">
                window.parent.jQuery("body").append("'.$html.'");
                window.parent.jQuery(".outputfrm").fadeIn(3000);


否则js读取html有问题

posted @ 2012-06-30 13:37  kingj  阅读(470)  评论(0)    收藏  举报