老师,请问怎么关闭新开的页面?
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>打开/关闭页面</title>
</head>
<body>
<input type="button" value="关闭本页面" id="close">
<input type="button" value="打开慕课网" id="open">
<script type="text/javascript">
var opens=document.getElementById("open");
var closes=document.getElementById("close");
opens.onclick=function(){
window.open("http://www.imooc.com","myWindow","width=200,height=100");
}
closes.onclick=function(){
opens.close();
}
</script>
</body>
</html>0
收起
正在回答 回答被采纳积分+1
3回答



恭喜解决一个难题,获得1积分~
来为老师/同学的回答评分吧
0 星