grgw_old_java/heatsupply2/WebContent/static/jquery-jbox/2.3/docs/iframe.html

32 lines
1.3 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Language" content="utf-8" />
<title>iframe</title>
<script type="text/javascript">
function go() {
// 调父窗口请用 parent 或 top如果是多层iframe需要调用多个parent
var html = "<div style='padding:10px;'>输入点什么:<input type='text' id='some' name='some' /></div>";
var submit = function (v, h, f) {
if (f.some == '') {
// f.some 或 h.find('#some').val() 等于 top.$('#some').val()
top.$.jBox.tip("请输入点什么。", 'error', { focusId: "some" }); // 关闭设置 some 为焦点
return false;
}
top.$.jBox.info("你输入了:" + f.some);
return true;
};
top.$.jBox(html, { title: "输入", submit: submit });
}
</script>
</head>
<body>
<center>
<button onclick="go()">调用父窗口 jBox </button> 本地测试时有的浏览没权限可以用IE来测
</center>
</body>
</html>