日期:2014-05-16  浏览次数:22733 次

Extjs4 对象不支持此属性或方法?? - Web 开发 / Ajax
JScript code
<%@ page language="java" pageEncoding="UTF-8"%>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://"
            + request.getServerName() + ":" + request.getServerPort()
            + path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
    <head>
        <base href="<%=basePath%>">

        <title>My JSP 'login' starting page</title>

        <meta http-equiv="pragma" content="no-cache">
        <meta http-equiv="cache-control" content="no-cache">
        <meta http-equiv="expires" content="0">
        <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
        <meta http-equiv="description" content="This is my page">

        <link rel="stylesheet" type="text/css"
            href="./resources/css/ext-all.css" />
        <script type="text/javascript" src="./bootstrap.js"></script>

        <script type="text/javascript">
          Ext.onReady(function(){
            var _panel=new Ext.form.Panel({
              title:"人员信息",
              // frame:true, //是否渲染表单
              width:300,
              height:200,
              // rendweTo:'form',
              listeners:{
                "render":function(_panel){
                  _panel.add({xtype:"textfield",fieldLabel:"姓名"});
                  _panel.add(new Ext.form.TextField({fieldLabel:"地址"}));
                }
              }
            });
            
            _panel.addButton({text:"确定"});
            _panel.addButton(new Ext.Button({text:"取消",minWidth:100}));
            _panel.render(Ext.getBody());
          });
        
        </script>

    </head>

    <body>
        <br>
    </body>
</html>


网页错误详细信息

用户代理: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; InfoPath.2)
时间戳: Wed, 11 Jan 2012 02:01:41 UTC


消息: 对象不支持此属性或方法
行: 37
字符: 13
代码: 0
URI: http://localhost:8080/Extjsweb/login.jsp



------解决方案--------------------
renderTo:Ext.getBody(),