想要关闭当前页怎么写?
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>close()</title>
<script type="text/javascript">
function ni(){
var s=confirm("确定打开网址么?");
if(s==true){
window.open("http://www.imooc.com/code/413");
}
else{
window.close();
}
}
</script>
</head>
<body>
<input type="button" value="打开网址" onClick=ni();>
</body>
</html>