import win.ui;
/*DSG{{*/
var winform = win.form(text="下载网站css或js";right=664;bottom=290;max=false)
winform.add(
buttonClose={cls="button";text="退出";left=348;top=204;right=498;bottom=262;color=14120960;font=LOGFONT(h=-14);note=" ";z=4};
buttonSave={cls="button";text="保存";left=162;top=204;right=312;bottom=262;color=14120960;font=LOGFONT(h=-14);note=" ";z=2};
editUrl={cls="edit";left=79;top=36;right=538;bottom=182;edge=1;multiline=1;style=1539;z=1};
static={cls="static";text="下载网址(自动换行)";left=79;top=12;right=368;bottom=33;transparent=1;z=3}
)
/*}}*/
import process;
import inet.http;
http = inet.http()
import inet.httpFile;
import console;
winform.editUrl.text = "http://*/layui.js";
winform.buttonSave.oncommand = function(id,event){
path = "/"++string.match(winform.editUrl.text,".*\/(.*)")
//string.save(path,http.get(url));
//process.exploreSelect(path)
http = inet.httpFile(winform.editUrl.text,path);
res = http.download()
if(res && http.complete){
http.close();
process.execute('/')
}
}
winform.buttonClose.oncommand = function(id,event){
win.quitMessage()
}
winform.show();
win.loopMessage();
aardio简单网站css或js下载练习
善小而为2023-08-21 14:53