我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

窗口关闭时导航到url

I am developing a web application for on-line test. For this I have a page Start_test.php which has a start button on click of which new_window opens without tool-bar which is fine. Now, my question is 'When gets completed then this new_window will be closed and start_test.php will be redirected to another page finish.php?' Can I do this?

Yes. In new_window use

function redirect(){
   window.opener.location="finish.php";
}
window.onbeforeunload = redirect;

近期文章

  • 这个要怎么链接到其他网站啊
  • 请问qt/c++怎么求线段与圆弧的交点坐标?
  • Clickhouse C++
  • Carla使用时,车辆自动驾驶过程中出现Falta Error
  • 进行绩效评价。 若本年经济增加值 >200 万bonus)为本年经济增加值的20%; 若 100万元 < 本年经济增加值 ≤ 200万元,则奖金为本年经济增加值的10%;
  • Proteus中新加入芯片如何改Keil5中的程序
  • 编写一个函数,功能为求三个数的平均值。
  • SubstanceDesinger材质球被锁
  • H3CIE现在是否还值得考
  • C++文件流操作PTA
  • PHP memcached会话无法正常工作
  • Toast,dialog显示
  • 关于#LCD#的屏幕显示图片的问题,如何解决?
  • python中发送url请求但url地址中包括#怎么办
  • C++文件流操作PTA
  • 想实现,选择不同项时,datagridview显示不同内容
  • 金牌650电源能带 撼讯6750xt么。
  • 使用deepsort检测数据集时:size mismatch
  • 省略@@RunWith注解
  • 查找复制特定字符串-文件

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华