localadd.js

来自「javascript 很酷的类库」· JavaScript 代码 · 共 39 行

JS
39
字号
isc.ListGrid.create({    ID: "countryList",    width:500, height:224, alternateRecordStyles:true, showAllRecords:true,    data: countryData,    fields:[        {name:"countryCode", title:"Flag", width:50, type:"image", imageURLPrefix:"flags/16/", imageURLSuffix:".png"},        {name:"countryName", title:"Country"},        {name:"capital", title:"Capital"},        {name:"continent", title:"Continent"}    ]})isc.IButton.create({    title:"Add EU (top)",    left:0, top:240, width:150,    click: function () {        countryList.data.addAt(            {countryCode:"EU", countryName:"European Union", capital:"Brussels", continent:"Europe"},            0 // first position in the data set        )            }})isc.IButton.create({    title:"Add Australia (bottom)",    left:170, top:240, width:150,    click: function () {        countryList.data.add( // add() defaults to last position in the data set            {countryCode:"AS", countryName:"Australia", capital:"Canberra", continent:"Australia/Oceania"}        )    }})

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?