<script   language= "Javascript "   type= "text/javascript "> 
var   Dvbbs_bIsIE5=document.all; 
var   Dvbbs_Mode   =   3; 
if   (Dvbbs_bIsIE5) 
{var   IframeID=frames[ "Dvbbs_Composition "];} 
else 

var   IframeID=document.getElementById( "Dvbbs_Composition ").contentWindow; 

function   Gopreview() 

document.preview.theBody.value=IframeID.document.body.innerHTML;   
var   popupWin   =   window.open( ' ',   'preview_page ',   'scrollbars=yes,width=750,height=450 '); 
document.preview.submit() 

Dvbbs_InitDocument( 'Body ', 'gb2312 '); 
</script> 
]]> 
<iframe   class= "Dvbbs_Reply "   id= "Dvbbs_Composition "   marginheight= "5 "   marginwidth= "5 "   width= "99% "   height= "227 "   onblur= "CheckCount( 'Body ', 'total '); "   > </iframe> 

解决方案 »

  1.   

    <script  language= "Javascript "  type= "text/javascript "> 
    var  Dvbbs_bIsIE5=document.all; 
    var  Dvbbs_Mode  =  3; 
    //下面的根据不同的浏览器,获得IframeID
    if  (Dvbbs_bIsIE5) 
    {var  IframeID=frames[ "Dvbbs_Composition "];} 
    else 

    var  IframeID=document.getElementById( "Dvbbs_Composition ").contentWindow; 

    //函数 预览内容
    function  Gopreview() 

    document.preview.theBody.value=IframeID.document.body.innerHTML;  //预览窗口的值
    var  popupWin  =  window.open( ' ',  'preview_page ',  'scrollbars=yes,width=750,height=450 '); 
    document.preview.submit() //提交

    Dvbbs_InitDocument( 'Body ', 'gb2312 ');  //初始化文档的字符集为gb2312
    </script> 
    ]]> 
    <iframe  class= "Dvbbs_Reply "  id= "Dvbbs_Composition "  marginheight= "5 "  marginwidth= "5 "  width= "99% "  height= "227 "  onblur= "CheckCount( 'Body ', 'total '); "  > </iframe>
      

  2.   

    <script  language= "Javascript "  type= "text/javascript "> 
    var  Dvbbs_bIsIE5=document.all; 
    var  Dvbbs_Mode  =  3; 
    //获得IframeID 
    if  (Dvbbs_bIsIE5) 
    {var  IframeID=frames[ "Dvbbs_Composition "];} 
    else 

    var  IframeID=document.getElementById( "Dvbbs_Composition ").contentWindow; 

    //函数 预览内容 
    function  Gopreview() 

    //设置窗口的值 
    document.preview.theBody.value=IframeID.document.body.innerHTML;  
    var  popupWin  =  window.open( ' ',  'preview_page ',  'scrollbars=yes,width=750,height=450 '); 
    document.preview.submit() 
    //提交 

    Dvbbs_InitDocument( 'Body ', 'gb2312 ');  //设置为中文字符
    </script> 
    ]]> 
    <iframe  class= "Dvbbs_Reply "  id= "Dvbbs_Composition "  marginheight= "5 "  marginwidth= "5 "  width= "99% "  height= "227 "  onblur= "CheckCount( 'Body ', 'total '); "  > </iframe>