|
楼主 |
发表于 2018-4-3 23:51:57
|
显示全部楼层
好的,发个完整的,听人劝吃饱饭
import win.ui;
/*DSG{{*/
mainForm = win.form(text="aardio form";right=708;bottom=430)
mainForm.add(
btnOpen={cls="button";text="打开";left=150;top=4;right=316;bottom=27;z=2};
custom={cls="custom";text="custom";left=29;top=40;right=683;bottom=413;z=1}
)
/*}}*/
import web.form;
var wb = web.form( mainForm.custom,,,true);
wb.noScriptErr=true;
mainForm.show()
mainForm.btnOpen.oncommand = function(id,event){
//wb.go("/res/showMsg.html") //这个可以弹出子窗口,并显示内容
wb.html = /**
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<script type="text/javascript">
function oper()
{
var path ="http://www.baidu.com" //弹出子窗口显示 远程带http可以打开
//var path = "ok.html" //弹出子窗口显示 ok.html 这几个字符 ,不是显示ok.html里面的内容
//var path = "/ok.html" //弹出子窗口显示 /ok.html 这几个字符 ,不是显示ok.html里面的内容
//var path = "/res/ok.html" //弹出子窗口显示 /res/ok.html 这几个字符 不是显示ok.html里面的内容
// ok.html 确定是存放在资源目录里的!
var zd = document.getElementById("txtReturnValue").value
var address = window.showModalDialog(path ,zd,"dialogHeight: 350px; dialogWidth: 800px;help: no;status: no;resizable: no; scroll:no;unadorned:on");
document.myform.txtReturnValue.value= address;
}
</script>
</head>
<body>
<form name="myform" method="post">
<div>
<div>
<input type="text" name="txtReturnValue" /><input type="button" name="xxx" value="子窗口" onclick="oper()" />
</div>
</div>
</form>
</body>
</html>
**/
}
|
|