请帮助有关关闭当前窗口的Java脚本。这是我的代码,它不起作用。
<input type="button" class="btn btn-success"
style="font-weight: bold;display: inline;"
value="Close"
onclick="closeMe()">
function closeMe()
{
window.opener = self;
window.close();
}
Run Code Online (Sandbox Code Playgroud)
我尝试了这个,但是还是不行
var win = window.open(“”,”_self”);
win.close();
Run Code Online (Sandbox Code Playgroud)