用JS的一个问题。‘NULL’为空或不是对象。代码很简单

来源:百度知道 编辑:UC知道 时间:2024/05/17 09:36:23
我是刚学习JS的,网上找了一段代码,自己怎么都过不去,提示‘NULL’为空或不是对象。行77字符1950.。。我都没有这么多行。。不明白。。请指点
<html xmlns=" http://www.w3.org/1999/xhtml" >
<head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>ExtJS</title>
<link rel="stylesheet" type="text/css" href="extjs/resources/css/ext-all.css" /> <script type="text/javascript" src="adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="ext-all.js"></script>
<script>
Ext.onReady(function(){
new Ext.Panel({
renderTo:"hello",
title:"hello",
width:300,
height:200,
html:'<h1>Hello,easyjf open source!</h1>',
tools:[
{id:"save&quo

renderTo:"hello", 这个配置项的意思是把面板渲染到ID为 hello的元素上,你的页面中有id为hello的元素吗?我看到你的 body中为空,至少要有个id为hello的元素,如:<div id="hello"></div>

adapter/ext/ext-base.js
ext-all.js

问题可能出现在这两个js文件中
你自己去查查吧
可以自己在js中加一些输出语句慢慢测试

路过.......
对Extjs不熟悉....