
Code AardioLine:30复制
1.2.3.4.5.6.7.8.9.10.11.12.13.14.15.16.17.18.19.20.21.22.23.24.25.26.27.28.29.30.import
win
.ui;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()
- winform.editUrl.text =
"http://cdn.staticfile.org/layui/2.8.12/layui.js"
; - winform.buttonSave.oncommand =
function
(id,event){ - path =
"/"
++string
.match(winform.editUrl.text,".*\/(.*)"
) -
string
.save(path,http.get(url)); - winform.msgbox(
"保存完成"
); - process.exploreSelect(path)
- }
- winform.buttonClose.oncommand =
function
(id,event){ -
win
.quitMessage() - }
- winform.show();
win
.loopMessage();