亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

HTML DOM closed 屬性

定義和用法

closed 屬性可返回一個布爾值,該值聲明了窗口是否已經(jīng)關(guān)閉。該屬性為只讀。

當瀏覽器窗口關(guān)閉時,表示該窗口的 Windows 對象并不會消失,它將繼續(xù)存在,不過它的 closed 屬性將設(shè)置為 true。

語法

window.closed

實例

下面的例子可檢測新窗口是否已被關(guān)閉:

<html>
<head>
<script type="text/javascript">
function ifClosed()
  {
  document.write("'myWindow' has been closed!")
  }
  
function ifNotClosed()
  {
  document.write("'myWindow' has not been closed!")
  }

function checkWin()
  {
  if (myWindow.closed)
    ifClosed()
  else
    ifNotClosed()
  }
</script>
</head>
<body>

<script type="text/javascript">
myWindow=window.open('','','width=200,height=100')
myWindow.document.write("This is 'myWindow'")
</script>

<input type="button" value="Has 'myWindow' been closed?"
onclick="checkWin()">

</body>
</html>