我始终取不到值/////严重郁闷
jquery 模态对话框,我如何获得子子窗口的值啊
下载网址,http://download.csdn.net/source/1514299/
演示网址:
http://blue.bokequn.cn/demos/modalbox/demo/demos.html 空有一个遮罩,取不到值,好郁闷
jquery 模态对话框,我如何获得子子窗口的值啊
下载网址,http://download.csdn.net/source/1514299/
演示网址:
http://blue.bokequn.cn/demos/modalbox/demo/demos.html 空有一个遮罩,取不到值,好郁闷
<!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" lang="zh-cn">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="author" content="Tank,Scrat,xiaoyuehen" />
<meta name="keywords" content="网页设计,XHTML,CSS,DIV,XHTML标准,WEB标准,WEB标准教程,网站重构, CSS布局, XHTML+CSS,layout, usability,搜集库,soujiku, CSS+DIV" />
<meta name="description" content="web标准教程站点,推动web标准在中国的应用." />
<title>modal box demos</title>
<link type="text/css" rel="stylesheet" href="style.css" />
<script type="text/javascript" src="../scripts/jquery.js"></script>
<script type="text/javascript" src="../scripts/bgiframe.js"></script>
<link type="text/css" rel="stylesheet" href="../source/modalbox.css" />
<script type="text/javascript" src="../source/modalbox.js"></script><style type="text/css">
.test
{
clear: both;
/*
position: absolute;
left: 100px;
top: 50px;
z-index: 4;
*/
border: 1px solid blue;
width: 200px;
height: 400px;
}
</style>
</head><body>
<select name="fffff">
<option value="fffff">fffff</option>
</select>
<input id="Text1" type="text" value ='fdfdfdf'/>
<input type="button" id="testbutton" value="测试一下" />
<input type="button" id="resizebutton" value="改变大小" />
<input type="button" id="movebutton" value="移动位置" />
<input type="button" id="closebutton" value="关闭最后一个" />
<div class="test" id="Dtest">
<h2>title</h2>
网页设计,XHTML,CSS,DIV,XHTML标准,WEB标准,WEB标准教程,网站重构, CSS布局, XHTML+CSS,layout, usability,搜集库,soujiku, CSS+DIV
</div>
<span id='result'></span>
</body>
</html>
<script type="text/javascript">
$(document).ready(function(){
/*
$(".test").bgiframe();
$(".test h2").mousedown(function(){
$(".test:eq(0)").ppdrag();
});
*/
// $("#testbutton").click(
// function (){
// var c= $('#Text1').val();
//
// $("#result").html(c);
// }
// )
$("#testbutton").click(function(){
//$.modalbox.show();
$.modalbox.show({
modal: true,
contentType: "url",
showCancel: false,
onclose: function (){
var a=$("#TextBox1").text();
alert (a);
//$("#result").html(a );
// alert($("#TextBox1").val());
}
,
content: 'child.aspx'
});
});// $("#resizebutton").click(function(){
// $.modalbox.resize({w: 300, h: 400});
// });// $("#movebutton").click(function(){
// $.modalbox.moveto({x: 40, y: 60});
// });// $("#closebutton").click(function(){
//// alert ('你好!');
//// $.modalbox.close();
// });
//$.modalbox.show();
})
</script>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="author" content="Tank,Scrat,xiaoyuehen" />
<meta name="keywords" content="网页设计,XHTML,CSS,DIV,XHTML标准,WEB标准,WEB标准教程,网站重构, CSS布局, XHTML+CSS,layout, usability,搜集库,soujiku, CSS+DIV" />
<meta name="description" content="web标准教程站点,推动web标准在中国的应用." />
<title></title>
<script type="text/javascript" src="../scripts/jquery.js"></script>
<script type="text/javascript">
$(document).ready(function(){
//parent.$.modalbox.resize({w: 500, h: 300});
//parent.$.modalbox.moveto("center");
})
</script>
<style type="text/css">
html, body
{
overflow: auto;
overflow-x:hidden;
}
*{
scrollbar-3dlight-color:#D4D0C8; /*- 最外左 -*/
scrollbar-highlight-color:#fff; /*- 左二 -*/
scrollbar-face-color:#E4E4E4; /*- 面子 -*/
scrollbar-arrow-color:#666; /*- 箭头 -*/
scrollbar-shadow-color:#808080; /*- 右二 -*/
scrollbar-darkshadow-color:#D7DCE0; /*- 右一 -*/
scrollbar-base-color:#D7DCE0; /*- 基色 -*/
scrollbar-track-color:#;/*- 滑道 -*/
}
</style>
</head><body><form runat ="server">
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
</form>
</body>
</html>
alert(textbox.value);//你页面中的文件跟空上不一样,里面没有TextBox1这个方本框
alert(textbox.value);//你页面中的文件跟空上不一样,里面没有TextBox1这个方本框还是不可以的空有一个遮罩,取不到值,好郁闷
这个东东的名字叫什么,我看看文档
演示网址:
http://blue.bokequn.cn/demos/modalbox/demo/demos.html
http://topic.csdn.net/u/20091121/15/22fb2dd3-47d9-46ba-ba39-d36603ccab60.html?44598
你在onOk中获取 就可以了,我看了源代码,他没有onbeforeclose之类的事件,只能是onOK了,
这个是我的演示地址:http://dl.dropbox.com/u/2555620/demo.html
那个文本框里只能输入数字 ,你点ok后会弹出第一个文本框 里的数字,你查看源代码