<script src="https://www.jb51.net/jquery.mini.js"></script>
<script src="artDialog.js?skin=default"></script>
<script src="https://www.jb51.net/article/plugins/iframeTools.js"></script>
<script src="https://www.jb51.net/article/skins/idialog.css"></script>
<title>jquery的处理</title>
</head>
<script>
function nihao(){
art.dialog.open( //打开一个iframe远程文件
"",
{
title :"测试的页面",
width: 320,
height: 400,
close : function(){
//iframe关闭时执行的
alert("my god 关闭了")
}
}
);
}
</script>
<body>
<input type="text" value="测试数据"/>
<a href="javascript::nihao()">提交</a>
我要把index2.html数据传输回去,当然我的index2打算点击X的时候就已经把数据传输回父iframe的框架怎么做,下边代码
复制代码 代码如下:
<script src="https://www.jb51.net/jquery.mini.js"></script>
<script src="artDialog.js?skin=default"></script>
<script src="https://www.jb51.net/article/plugins/iframeTools.js"></script>
<script src="https://www.jb51.net/article/skins/idialog.css"></script>
<title>jquery的处理</title>
</head>
<body>
<input type="text" value="2222111" />
<script>
var origin = artDialog.open.origin;
var v = origin.document.getElementById('nihao');
v.value = document.getElementById('chushu').value;
</script>
当然数据不是点击X按钮的传输可以用自带的art.dialog.data(‘test', val);这种方法来传输!!事件匆忙写的比较紧,大家有不懂的找我就可以了!
您可能感兴趣的文章: