茄子在线看片免费人成视频,午夜福利精品a在线观看,国产高清自产拍在线观看,久久综合久久狠狠综合

    <s id="ddbnn"></s>
  • <sub id="ddbnn"><ol id="ddbnn"></ol></sub>

  • <legend id="ddbnn"></legend><s id="ddbnn"></s>

    extjs_02_grid顯示本地?cái)?shù)據(jù)、顯示跨域數(shù)據(jù)
    來源:易賢網(wǎng) 閱讀:1336 次 日期:2014-07-17 19:22:27
    溫馨提示:易賢網(wǎng)小編為您整理了“extjs_02_grid顯示本地?cái)?shù)據(jù)、顯示跨域數(shù)據(jù)”,方便廣大網(wǎng)友查閱!

    這篇文章主要介紹了extjs_02_grid顯示本地?cái)?shù)據(jù)、顯示跨域數(shù)據(jù)的具體實(shí)現(xiàn),需要的朋友可以參考下。

    1.顯示表格

    <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

    <html>

    <head>

    <title>My JSP 'index.jsp' starting page</title>

    <link rel="stylesheet" type="text/css" href="./extjs4.1/resources/css/ext-all.css">

    <script type="text/javascript" src="./extjs4.1/ext-all-debug.js"></script>

    <script type="text/javascript" src="./extjs4.1/locale/ext-lang-zh_CN.js"></script>

    <script type="text/javascript">

    Ext.onReady(function() {

    // 定義表格

    var grid = new Ext.grid.Panel({

    columns : [ {

    text : '行號(hào)'

    }, {

    text : '學(xué)號(hào)'

    }, {

    text : '姓名'

    }, {

    text : '班級(jí)'

    }, {

    text : '語文'

    }, {

    text : '數(shù)學(xué)'

    }, {

    text : '英語'

    } ]

    });

    // 定義窗口

    var window = Ext.create("Ext.window.Window", {

    title : '學(xué)生成績表',

    width : 600,

    height : 400,

    items : grid,

    layout : 'fit'//表格填充窗口

    });

    // 顯示窗口

    window.show();

    });

    </script>

    </head>

    <body>

    顯示表格

    <br>

    </body>

    </html>

    2.顯示本地?cái)?shù)據(jù)

    名單

    <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

    <html>

    <head>

    <title>My JSP 'index.jsp' starting page</title>

    <link rel="stylesheet" type="text/css" href="./extjs4.1/resources/css/ext-all.css">

    <script type="text/javascript" src="./extjs4.1/ext-all-debug.js"></script>

    <script type="text/javascript" src="./extjs4.1/locale/ext-lang-zh_CN.js"></script>

    <script type="text/javascript">

    Ext.onReady(function() {

    // 自定義數(shù)據(jù)模型

    var myModel = Ext.define("studentInfo", {

    extend : 'Ext.data.Model',

    fields : [ {

    name : 'stuNo',

    type : 'string'

    }, {

    name : 'stuName',

    type : 'string'

    }, {

    name : 'stuClass',

    type : 'string'

    }, {

    name : 'chScore',

    type : 'number'

    }, {

    name : 'maScore',

    type : 'number'

    }, {

    name : 'enScore',

    type : 'number'

    } ]

    });

    // 本地?cái)?shù)據(jù)

    var myData = [ [ 'No1', 'wangzs1', '1年級(jí)', 80, 67, 49 ],

    [ 'No2', 'wangzs2', '2年級(jí)', 65, 57, 79 ],

    [ 'No3', 'wangzs3', '3年級(jí)', 45, 77, 59 ],

    [ 'No4', 'wangzs4', '4年級(jí)', 99, 27, 19 ],

    [ 'No5', 'wangzs5', '5年級(jí)', 23, 97, 99 ],

    [ 'No6', 'wangzs6', '6年級(jí)', 34, 67, 99 ], ];

    var myStore = Ext.create("Ext.data.Store", {

    model : 'studentInfo',

    data : myData

    });

    // 表格

    var myGrid = new Ext.grid.Panel({

    columns : [ {

    xtype : 'rownumberer',

    text : '行號(hào)'

    }, {

    text : '學(xué)號(hào)',

    dataIndex : 'stuNo'

    }, {

    text : '姓名',

    dataIndex : 'stuName'

    }, {

    text : '班級(jí)',

    dataIndex : 'stuClass'

    }, {

    text : '語文',

    dataIndex : 'chScore'

    }, {

    text : '數(shù)學(xué)',

    dataIndex : 'maScore'

    }, {

    text : '英語',

    dataIndex : 'enScore'

    } ],

    store : myStore

    });

    // 窗口

    var window = Ext.create("Ext.window.Window", {

    title : '學(xué)生成績表',

    width : 600,

    height : 400,

    items : myGrid,

    layout : 'fit'

    });

    window.show();

    });

    </script>

    </head>

    <body>

    顯示本地?cái)?shù)據(jù)

    <br>

    </body>

    </html>

    3.顯示跨域jsonp數(shù)據(jù)

    名單

    <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

    <html>

    <head>

    <title>My JSP 'index.jsp' starting page</title>

    <link rel="stylesheet" type="text/css" href="./extjs4.1/resources/css/ext-all.css">

    <script type="text/javascript" src="./extjs4.1/ext-all-debug.js"></script>

    <script type="text/javascript" src="./extjs4.1/locale/ext-lang-zh_CN.js"></script>

    <script type="text/javascript">

    Ext.onReady(function() {

    // 自定義數(shù)據(jù)模型

    var jsonpModel = Ext.define("jsonpModel", {

    extend : 'Ext.data.Model',

    fields : [ {

    name : 'userid',

    type : 'string'

    }, {

    name : 'username',

    type : 'string'

    }, {

    name : 'dateline',

    type : 'string'

    }, {

    name : 'title',

    type : 'string'

    } ]

    });

    // 數(shù)據(jù)

    var myStore = Ext.create("Ext.data.Store", {

    model : 'jsonpModel',

    pageSize : 10,//配置每頁顯示記錄數(shù)

    proxy : {

    type : 'jsonp',

    url : 'http://www.sencha.com/forum/topics-browse-remote.php',

    reader : {

    totalProperty : 'totalCount',

    root : 'topics'

    }

    },

    autoLoad : true

    // 自動(dòng)加載數(shù)據(jù)

    });

    // 表格

    var myGrid = new Ext.grid.Panel({

    columns : [ {

    xtype : 'rownumberer',

    text : '行號(hào)'

    }, {

    text : '用戶id',

    dataIndex : 'userid'

    }, {

    text : '用戶姓名',

    dataIndex : 'username'

    }, {

    text : '時(shí)間線',

    dataIndex : 'dateline'

    }, {

    text : '標(biāo)題',

    dataIndex : 'title'

    } ],

    store : myStore,

    bbar : {// 在表格底部 配置分頁

    xtype : 'pagingtoolbar',

    store : myStore,

    displayInfo : true

    }

    });

    // 窗口

    var window = Ext.create("Ext.window.Window", {

    title : '學(xué)生成績表',

    width : 600,

    height : 400,

    items : myGrid,

    layout : 'fit'

    });

    window.show();

    });

    </script>

    </head>

    <body>

    顯示跨域jsonp數(shù)據(jù)

    <br>

    </body>

    </html>

    更多信息請(qǐng)查看IT技術(shù)專欄

    更多信息請(qǐng)查看網(wǎng)絡(luò)編程
    由于各方面情況的不斷調(diào)整與變化,易賢網(wǎng)提供的所有考試信息和咨詢回復(fù)僅供參考,敬請(qǐng)考生以權(quán)威部門公布的正式信息和咨詢?yōu)闇?zhǔn)!

    2026國考·省考課程試聽報(bào)名

    • 報(bào)班類型
    • 姓名
    • 手機(jī)號(hào)
    • 驗(yàn)證碼
    關(guān)于我們 | 聯(lián)系我們 | 人才招聘 | 網(wǎng)站聲明 | 網(wǎng)站幫助 | 非正式的簡要咨詢 | 簡要咨詢須知 | 新媒體/短視頻平臺(tái) | 手機(jī)站點(diǎn) | 投訴建議
    工業(yè)和信息化部備案號(hào):滇ICP備2023014141號(hào)-1 云南省教育廳備案號(hào):云教ICP備0901021 滇公網(wǎng)安備53010202001879號(hào) 人力資源服務(wù)許可證:(云)人服證字(2023)第0102001523號(hào)
    云南網(wǎng)警備案專用圖標(biāo)
    聯(lián)系電話:0871-65099533/13759567129 獲取招聘考試信息及咨詢關(guān)注公眾號(hào):hfpxwx
    咨詢QQ:1093837350(9:00—18:00)版權(quán)所有:易賢網(wǎng)
    云南網(wǎng)警報(bào)警專用圖標(biāo)