5,388
社区成员
发帖
与我相关
我的任务
分享
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8"></meta>
<title>Title</title>
<link rel="stylesheet" href="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/css/bootstrap.min.css"></link>
<script src="http://cdn.static.runoob.com/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script>
/*
var args = {
"appid":"4481",
"uid":"peidw",
"signature":"1dG4eASyEHsiEn2AJZsyFwudwVlhPTQ0ODEmbT1hcGlfYXV0aCZ0PTExNTA5MDk1NjQ5ODY1JmU9NjAw",
"redirect":"http://fkwx.ittun.com/authResult"
};
for (var arg in args) {
alert(arg+" "+args[arg]);
}
*/
function openmodel(){
var obj = new Object();
obj.name="51js";
window.showModalDialog("model.html",obj,"dialogWidth=600px;dialogHeight=300px");
//window.external.showModalDialog("model.html",obj,"dialogWidth=600px;dialogHeight=300px");
}
</script>
</head>
<body>
非嵌套页里打开ireame
<a href="#" onclick="openmodel()">打开模态一个窗口</a>
<p><hr></hr></p>
<iframe src="iframe.html" scrolling="yes" height="600px" width="100%">
</iframe>
</body>
</html>
<!DOCTYPE html>
<html lang="zh">
<head>
<meta charset="UTF-8"></meta>
<title>Title</title>
<link rel="stylesheet" href="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/css/bootstrap.min.css"></link>
<script src="http://cdn.static.runoob.com/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="http://cdn.static.runoob.com/libs/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script>
var obj = window.dialogArguments
//alert("您传递的参数为:" + obj.name)
function closex() {
document.getElementById("frm_1").submit();
}
</script>
</head>
<body onunload="closex()">
<form class="form-horizontal" role="form" id="frm_1" target="frm_x" action="/formSub">
<div class="form-group">
<label for="firstname" class="col-sm-2 control-label">名字</label>
<div class="col-sm-4">
<input type="text" class="form-control input-sm" id="firstname"
placeholder="请输入名字">
</div>
</div>
<div class="form-group">
<label for="lastname" class="col-sm-2 control-label">姓</label>
<div class="col-sm-4">
<input type="text" class="form-control input-sm" id="lastname"
placeholder="请输入姓">
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-4">
<div class="checkbox">
<label>
<input type="checkbox"> 请记住我
</label>
</div>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-2 col-sm-4">
<button type="button" onclick="javascript:window.close()" id="btn_submit" class="btn btn-default">登录</button>
</div>
</div>
</form>
</body>
</html>