Closing a window

后端 未结 2 1415
無奈伤痛
無奈伤痛 2021-01-29 00:03

This line is from my JSP file.

I opened this page by setting a target attribute in the tag like target =\"_TOP\", but the code below

2条回答
  •  无人共我
    2021-01-29 00:42

    You can only close a window with JavaScript that has been opened with JavaScript. Since you went with an HTML method, this won't work.

    However, if you were to re-code so that JavaScript was opening the window instead...

    mylink
    

    Then you could close the resulting window with JavaScript.

提交回复
热议问题