Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/extjs/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
未捕获的语法错误:无效或意外的标记@import css_Css_Extjs - Fatal编程技术网

未捕获的语法错误:无效或意外的标记@import css

未捕获的语法错误:无效或意外的标记@import css,css,extjs,Css,Extjs,编辑:这是一个打字错误-我错误地使用了脚本而不是链接,没有注意到。因为已经有了一个正确的答案,我不会删除这个问题,即使它很愚蠢。我只接受答案 我正在努力学习ExtJS。 我已经编写了下面的简单代码。我添加了neptune主题css文件以设置组件的样式,但出现以下错误: Uncaught SyntaxError: Invalid or unexpected token 错误发生在上述文件内的导入处: @import 'theme-neptune-all_1.css'; @import 'them

编辑:这是一个打字错误-我错误地使用了脚本而不是链接,没有注意到。因为已经有了一个正确的答案,我不会删除这个问题,即使它很愚蠢。我只接受答案

我正在努力学习ExtJS。 我已经编写了下面的简单代码。我添加了neptune主题css文件以设置组件的样式,但出现以下错误:

Uncaught SyntaxError: Invalid or unexpected token
错误发生在上述文件内的导入处:

@import 'theme-neptune-all_1.css';
@import 'theme-neptune-all_2.css';
我做错了什么

<!DOCTYPE html>
<html>
   <head>
      <script type = "text/javascript" 
         src = "ext-6.6.0-trial/build/classic/theme-neptune/resources/theme-neptune-all.css"></script>
      <script type = "text/javascript" 
         src = "ext-6.6.0-trial/build/ext-all.js"></script>

      <script type = "text/javascript">
         Ext.onReady(function() {
            Ext.create('Ext.Panel', {
               renderTo: 'helloWorldPanel',
               height: 200,
               width: '50%',
               title: 'Hello world',
               html: 'First Ext JS Hello World Program'
            });

         });

      </script>
   </head>

   <body>
      <div id = "helloWorldPanel" />
   </body>
</html>

Ext.onReady(函数(){
Ext.create('Ext.Panel'{
renderTo:“helloWorldPanel”,
身高:200,
宽度:“50%”,
标题:“你好,世界”,
html:“第一个Ext JS Hello World程序”
});
});

错误在于告诉浏览器它将要读取javascript,然后给它CSS。您希望使用
链接
元素加载CSS,而不是
脚本
标记


现在我明白了。。。这是一个打字错误——我错误地使用了脚本而不是链接,并且没有注意到。无论如何,我会接受这个答案,因为它是正确的,我不会删除这个愚蠢的问题。非常感谢。