代码如下
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>新闻中心</title>
  <SCRIPT language="javascript" src="js/MouseOver.js"></SCRIPT>
  <SCRIPT language="javascript" src="js/tree.js"></SCRIPT>
  <LINK href="css/ysb.css" type=text/css rel=stylesheet>
  <LINK href="css/style.css" type=text/css rel=stylesheet>
  <LINK href="css/menu.css" type="text/css" rel="stylesheet"></HEAD>
<body text="#000000" bgColor="#ffffff" leftMargin="0" topMargin="0" marginheight="0" marginwidth="0"><table width="800" border="0" cellspacing="0" cellpadding="0" align="center" bgcolor="#0065b3">
<tr>
  <td width="238">
    <div align="center">
      <img src="logo_new.jpg" width="219" height="58">
    </div>
  </td>
  <td height="70"  width="512">
    
  </td>
</tr>
</table>
  <table width="800" border="0" cellspacing="0" cellpadding="0" align="center" bgcolor="#aaaaaa">
    <tr>
      <td height="34">
        <div align="left">
          <script language="javascript">createMainLayer();</script>
        </div>
      </td>
      <td >
      </td>
    </tr>
  </table>
</body>
</html>

解决方案 »

  1.   

    Response.Write("<script Language=JavaScript>")
     Response.Write("ChildWindow = window.open('PasswordTestfy.aspx?MemberID=" & MemberID & "&CardTypeTableName=" & CardtypeTableName & "&WhetherLostTestify=1" & "', '111', 'width=370,height=160,top=100,left=200,toolbar=no,status=no,location=no,menubar=no,directories=no,scrollbars=no,resizable=no')")
     Response.Write("</script>")
      

  2.   

    编译错误 
    说明: 在编译向该请求提供服务所需资源的过程中出现错误。请检查下列特定错误详细信息并适当地修改源代码。 编译器错误信息: BC30037: 字符无效。源错误: 行 30:         <div align="left">
    行 31:         <%
    行 32:         Response.Write("<script language=javascript>");
    行 33:         Response.Write("createMainLayer()");
    行 34:         Response.Write("</script>");
     源文件: F:\产品文件\测试\tex.aspx    行: 32 
      

  3.   

    Page.RegisterStartupScript("ShowError","<script>alert('请先选择添加的供应商');</script>");
      

  4.   

    Response.Write("<script>creatMainLayer()<"" + / + "" script>");
      

  5.   

    行 32:         Response.Write("<script language=javascript>");
    行 33:         Response.Write("createMainLayer()");
    行 34:         Response.Write("</script>");;应该去掉,asp语句不要;结尾的
      

  6.   

    我和楼上写的一样,是不报错了,但是函数在客户端没有执行
    运行后查看源代码如下
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
    <HTML>
    <HEAD>
    <title>新闻中心</title>
      <SCRIPT language="javascript" src="js/MouseOver.js"></SCRIPT>
      <SCRIPT language="javascript" src="js/tree.js"></SCRIPT>
      <LINK href="css/ysb.css" type=text/css rel=stylesheet>
      <LINK href="css/style.css" type=text/css rel=stylesheet>
      <LINK href="css/menu.css" type="text/css" rel="stylesheet"></HEAD>
    <body text="#000000" bgColor="#ffffff" leftMargin="0" topMargin="0" marginheight="0" marginwidth="0"><table width="800" border="0" cellspacing="0" cellpadding="0" align="center" bgcolor="#0065b3">
    <tr>
      <td width="238">
        <div align="center">
          <img src="logo_new.jpg" width="219" height="58">
        </div>
      </td>
      <td height="70"  width="512">
        
      </td>
    </tr>
    </table>
      <table width="800" border="0" cellspacing="0" cellpadding="0" align="center" bgcolor="#aaaaaa">
        <tr>
          <td height="34">
            <div align="left">
            <script>creatMainLayer()</script>
            </div>
          </td>
          <td >
          </td>
        </tr>
      </table>
    </body>
    </html>
      

  7.   

    生命,我的文件是aspx,不是asp,asp是可以的
      

  8.   

    你究竟要干什么,creatMainLayer()是个什么东西,写在那里,贴来看看
      

  9.   

    creatMainLayer()是js/tree.js里的一个函数,画菜单用的
      

  10.   

    Page.RegisterStartupScript("creatMainLayer","<script>creatMainLayer();</script>");是可以的
      

  11.   

    我试了显示字符串无效,你们在aspx里这样用过吗?