我有两个静态页面,一个a.html页面,一个b.html页面 ,当我点a.html中的某个按钮时,他触发一个事件,
像这样{window.open('b.html');}弹出b.html页面,然后在b.html页面中选择值,再传到a.html页面中,
请问如何将b.html页面中的值传到a.html页面中啊?最好不要牵扯到数据库,高手帮忙解答,谢谢
像这样{window.open('b.html');}弹出b.html页面,然后在b.html页面中选择值,再传到a.html页面中,
请问如何将b.html页面中的值传到a.html页面中啊?最好不要牵扯到数据库,高手帮忙解答,谢谢
http://hi.baidu.com/see7di/blog/item/02e4c9b4479deb648ad4b242.html
<input type="button" value="click" onclick="window.open('b.html','','status=no,scrollbars=no,top=200,left=150,width=420,height=165');" >b.html<script type="text/javascript">
function getVal(){
var key = document.getElementById("num").value;
window.opener.document.getElementById("test").value=key;
}
</script>
<select id="num" onchange="getVal()">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>
你能不能简单的给我解释一下以下的jquery啊
<script type='text/javascript'>
$(function(){
$('#b1').click(function(){
$.Cimg({
'typ':'show',
'url':'file.htm',
'box':'box1',
'hid':'id1'
});
})
});
</script>
$.Cimg是我写的一个jquery扩展
typ这个参数告诉浏览器打开模态窗口
url这个参数是模态窗口要访问的页面
box这个参数是父窗口用来存放图片的div的id
hid这个参数是父窗口用来存放图片的地址的textarea(或input)的id