"ui";
ui.layout(<vertical padding="28"><ScrollView><vertical><input id="name1" hint="1"/><input id="name2" hint="2"/><input id="name3" hint="3"/><input id="name4" hint="4"/><input id="name10" hint="10"/><button id="ok" text="确定"/></vertical></ScrollView></vertical>);
var storage = storages.create("这个是一个文件名");for(i=0;i<4;i++){var content=storage.get("name"+(i+1));if(content){ui["name"+(i+1)].setText(content);}}
//指定确定按钮点击时要执行的动作ui.ok.click(function(){arr = new Array();for(i=0;i<4;i++){var content=ui["name"+(i+1)].getText()+"";storage.put("name"+(i+1),content);arr.push(content);}log(arr);});
ui.layout(<vertical padding="28"><ScrollView><vertical><input id="name1" hint="1"/><input id="name2" hint="2"/><input id="name3" hint="3"/><input id="name4" hint="4"/><input id="name10" hint="10"/><button id="ok" text="确定"/></vertical></ScrollView></vertical>);
var storage = storages.create("这个是一个文件名");for(i=0;i<4;i++){var content=storage.get("name"+(i+1));if(content){ui["name"+(i+1)].setText(content);}}
//指定确定按钮点击时要执行的动作ui.ok.click(function(){arr = new Array();for(i=0;i<4;i++){var content=ui["name"+(i+1)].getText()+"";storage.put("name"+(i+1),content);arr.push(content);}log(arr);});