代码之家  ›  专栏  ›  技术社区  ›  Bijoy Bahuleyan

无法在浏览器中查看extjs脚本

  •  0
  • Bijoy Bahuleyan  · 技术社区  · 10 年前

    我无法在js页面中查看extjsjs代码。页面在浏览器中打开,标题是我在标题标签中给出的任何内容。但脚本没有在正文中获得链接。任何人都可以通过以下代码识别错误。请帮助我确定问题。

    使用的平台是netbeans 7.1+Apache Tomcat 6+extjs-3.2.1

    索引jsp

    <%@page contentType="text/html" pageEncoding="UTF-8"%>
    <!DOCTYPE html>
    <html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link rel="stylesheet" type="text/css" href="JS/ext-3.2.1/resources/css/ext-all.css">
        <script type="text/javascript" src="JS/ext-3.2.1/ext-all.js"></script>
        <title>Extjs learning</title>
    </head>
    <body>
        <script type="text/javascript" src="JS/BorderLayout.js"></script>
    </body>
    </html>
    

    边框布局.js

    /* 
     * author : Bijoy Bahuleyan
     * date   :
     */
    
    Ext.onReady(function(){    
    Ext.QuickTips.init();    
    Ext.container.Viewport({
        layout:  'border',
        id: 'mainbody',
        items: [
        {
            region: 'North',
            id: 'north',
            collapsible: true,
            title: 'North',
            html: 'North'
        },
        {
            region: 'south',
            id: 'south',
            collapsible: true,
            title: 'South',
            split: true,
            html: 'South'
        },
        {
            region: 'center',
            id: 'center',
            collapsible: true,
            title: 'Center',
            split: true,
            html: 'Center'
        },
        {
            region: 'east',
            id: 'east',
            collapsible: true,
            title: 'East',
            split: true,
            html: 'East'
        },
        {
            region: 'west',
            id: 'west',
            collapsible: true,
            title: 'West',`enter code here`
            split: true,
            html: 'West'
        }
        ],
        renderTo: Ext.getBody() 
    });
    

    页面链接正确,我反复检查了几次

    提前感谢!

    1 回复  |  直到 10 年前
        1
  •  1
  •   Elliott    10 年前

    如果您使用的代码与此处显示的代码完全相同,那么“title:'West','enter-code here'”这一行肯定会破坏它。请删除'enter-codehere'或将其注释为//enter-code此处。它位于javascript示例的底部附近。

    如果你没有按照看起来的那样使用代码,请在jsfiddle.net测试它。如果它有效,那肯定是你的路径。