parent.followTd10.innerHTML='内容1' + '内容2' + '内容3' +.....
试试看

解决方案 »

  1.   

    JavaScript 中的字符串内容如果需要换行要这么写:
    var a = "abc\
    def";
    因此你输出时也要把所有的换行前面加一个 \,替换一下就成了。
      

  2.   

    引起你这个问题的原因可能有一个就是
    你jsp输出的字符集不一致,
    在两个jsp里面分别加上
    <%@ page contentType="text/html; charset=GB2312" %>
    还有
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
      

  3.   

    alert一下innerhtml的内容,看是否含有“\r”,我原来就是这个问题。含有的话先将它过滤掉。
      

  4.   

    在iframe中的那个页,不能有<html>标记!
    如果有,要去掉!
      

  5.   

    是不是可以这样:
    1
    <iframe name=framexh width=200 height=200 style="display:none" border=0 frameborder=0 framespacing=0 marginheight=0 marginwidth=0></iframe>
    <SCRIPT LANGUAGE="JavaScript">
    <!--
    framexh.location.replace('sjload.jsp?zh=<%=strZh%>');
    //-->
    </SCRIPT>
    2.
    <%@ include file="common.jsp" %>
    <%@ page import="java.sql.*"%>
    <jsp:useBean id="conn" scope="page" class="gkgl.database.LinkSQL"/>
    <jsp:useBean id="jsp" scope="page" class="gkgl.include.OutString"></jsp:useBean>
    <html><head>
    <meta http-equiv="Content-Language" content="zh-cn">
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312"><%
    String strZh=request.getParameter("zh");
    String strSql="select count(*) as fs,nvl(sum(sjze),0) as sjze from sk_spxx where zt=to_char(sysdate,'YYYYMMDD')||'"+strZh+"'";
    ResultSet Rsa=conn.executeQuery(strSql);
    out.println( "<SCRIPT LANGUAGE='JavaScript'>");
    Rsa.next();
    out.println("parent.window.yxje.innerText='"+Rsa.getString("sjze")+"'");
    out.println("parent.window.yxfs.innerText='"+Rsa.getString("fs")+"'");
    Rsa.close();
    conn.close();
    out.println( "</SCRIPT>");
    %>
    <SCRIPT LANGUAGE="JavaScript">
    <!--
    window.location.replace('about:blank');
    //-->
    </SCRIPT>
    </BODY>
    </HTML>