aardio 文档

aardio 范例:FileInput

//FileInput
import win.ui;
/*DSG{{*/
var winform = win.form(text="aardio form";right=759;bottom=469)
winform.add()
/*}}*/

import web.view;
var wb = web.view(winform);

wb.html = /**
<!doctype html>
<html>
<head> 
</head>
<body>
     <input type="file">
</body>
</html>
**/

//获取控件
var fileInput = wb.cdpWaitQuery(`input[type="file"]`);

//设置文件路径
fileInput.files = { io._exepath }; 

//设置文件路径,fileInput 参数指定了 nodeId 与 files 这两个字段的值
wb.cdp("DOM.setFileInputFiles",fileInput) 

winform.show();
win.loopMessage();

Markdown 格式