若是没有出现自动提示则右击你的JS文件,有个Open with - 选择spket JavaScript Editor。 若是仍旧没有出现提示则能够经过在项目文件上点击右键,选择“Reload Javascript Profiles”菜单,对javascript文件从新加载。javascript
Extjs4.0开始比以往有些变化,用起来麻烦不小。与之前的引入三个文件不一样,如今的4.0只要引用两个文件就好了。 css
[javascript] view plaincopyprint?html
<link rel="stylesheet" type="text/css" href="extjs-4.2.1/resources/css/ext-all.css"> // 引入样式文件 java
<script type="text/javascript" src="extjs-4.2.1/bootstrap.js" ></script> web
<script type="text/javascript" src="ext-4.2.1/locale/ext-lang-zh_CN.js"></script> // 中文化 bootstrap
<script>
Ext.onReady(function(){
…///在这里面建立及使用ext控件
});
</script>
eclipse
hellowrod.js
[javascript] view plaincopyprint?工具
(function() 开发工具
{ 字体
Ext.onReady(function()
{
Ext.Msg.alert("hello wrod!"); // 弹出hellowrod对话框 (实例化组 件) } }) ();
html代码
[html] view plaincopyprint?
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
<link rel="stylesheet" type="text/css" href="./css/test.css">
<link rel="stylesheet" type="text/css" href="./js/ext-4.2.1-gpl/resources/css/ext-all.css">//资源样式文件
<script type="text/javascript" src="./js/ext-4.2.1-gpl/bootstrap.js"></script>
<script type="text/javascript" src="./js/ext-4.2.1-gpl/locale/ext-lang-zh_CN.js"></script>//中文化
<script type="text/javascript" src="./js/helloword.js"></script>
</head>
<body>
</body>
</html>
[javascript] view plaincopyprint?
<pre code_snippet_id="170450" snippet_file_name="blog_20140125_1_6261797"></pre>
<pre></pre>
<pre></pre>
<pre></pre>