<body onbeforeunload="alert(window.location.href)">
解决方案 »
- xmlhttp.open访问XML 拒绝访问
- 跪求一解,js日期判断的问题
- setTimeout("document.getElementById('son').style.width="+i+"px这条语句为什么不是按指定时间执行
- html 用js直接加载webservice xml对象 list
- Js重载?
- [请教]关于在一个文本框中输入数据后,按回车后自动在别的文本框带出数据的问题
- 需用JS列举出多个数字的全部组合方式,规则有些特殊,请教高手
- 请教一个关于正则表达式的问题
- [求助]鼠标放到图片上时,图片停止滚动
- 送分问题:为何滚屏代码不工作 ?
- 屏蔽IE工具栏等的高难度问题?????路过的高手都都看看吧;-)
- <iframe>和<frame>在JavasScript中有什么区别
<head>
<script>window.open("son01.htm")
</script>
</head>
<body>
<input type=text name="textn" >
</body>
**son01.htm
<head>
<script>
function maincall()
{
window.opener.textn.value=document.location.href
}function changehref()
{
document.location.href="son02.htm"
}
</script>
</head>
<body onbeforeunload="maincall()">
<input type=button name="buttonn" value="href to son02.htm" onclick="changehref()">
</body>
**son02.htm
<head>
<script>
function maincall()
{
window.opener.textn.value=document.location.href
}function changehref()
{
document.location.href="son01.htm"
}
</script>
</head>
<body onbeforeunload="maincall()">
<input type=button name="buttonn" value="href to son01.htm" onclick="changehref()">
</body>