如何捕获标签页被关闭的事件?

shotr 2006-11-04 10:26:12
现在很多浏览器都支持标签页浏览,请问怎么知道用户关闭标签页(但没有关闭浏览器)的事件?
比如在工行的网上银行的页面被关闭时会弹出一个提示
...全文
347 13 打赏 收藏 转发到动态 举报
写回复
用AI写文章
13 条回复
切换为时间正序
请发表友善的回复…
发表回复
shotr 2006-11-15
  • 打赏
  • 举报
回复
关了用户的Session还会存在啊,怎么在那个时候把Session结束掉?
================
还有这回事?
================


是的,除非把浏览器关掉
只关Tag是不行的..
yoshikage 2006-11-08
  • 打赏
  • 举报
回复
关了用户的Session还会存在啊,怎么在那个时候把Session结束掉?
================
还有这回事?
hero4u 2006-11-05
  • 打赏
  • 举报
回复
...........................
关了就关了呗。呵呵
shotr 2006-11-05
  • 打赏
  • 举报
回复
上面的事件好像没看到哪个像的..

=============
关了就关了呗。呵呵
=============
关了用户的Session还会存在啊,怎么在那个时候把Session结束掉?
yoshikage 2006-11-04
  • 打赏
  • 举报
回复
onabort
Fires when the user aborts the download of an image.

onactivate
Fires when the object is set as the active element.

onafterprint
Fires on the object immediately after its associated document prints or previews for printing.

onafterupdate
Fires on a databound object after successfully updating the associated data in the data source object.

onbeforeactivate
Fires immediately before the object is set as the active element.

onbeforecopy
Fires on the source object before the selection is copied to the system clipboard.

onbeforecut
Fires on the source object before the selection is deleted from the document.

onbeforedeactivate
Fires immediately before the activeElement is changed from the current object to another object in the parent document.

onbeforeeditfocus
Fires before an object contained in an editable element enters a UI-activated state or when an editable container object is control selected.

onbeforepaste
Fires on the target object before the selection is pasted from the system clipboard to the document.

onbeforeprint
Fires on the object before its associated document prints or previews for printing.

onbeforeunload
Fires prior to a page being unloaded.

onbeforeupdate
Fires on a databound object before updating the associated data in the data source object.

onblur
Fires when the object loses the input focus.

onbounce
Fires when the behavior property of the marquee object is set to "alternate" and the contents of the marquee reach one side of the window.

oncellchange
Fires when data changes in the data provider.

onchange
Fires when the contents of the object or selection have changed.

onclick
Fires when the user clicks the left mouse button on the object.

oncontextmenu
Fires when the user clicks the right mouse button in the client area, opening the context menu.

oncontrolselect
Fires when the user is about to make a control selection of the object.

oncopy
Fires on the source element when the user copies the object or selection, adding it to the system clipboard.

oncut
Fires on the source element when the object or selection is removed from the document and added to the system clipboard.

ondataavailable
Fires periodically as data arrives from data source objects that asynchronously transmit their data.

ondatasetchanged
Fires when the data set exposed by a data source object changes.

ondatasetcomplete
Fires to indicate that all data is available from the data source object.

ondblclick
Fires when the user double-clicks the object.

ondeactivate
Fires when the activeElement is changed from the current object to another object in the parent document.

ondrag
Fires on the source object continuously during a drag operation.

ondragend
Fires on the source object when the user releases the mouse at the close of a drag operation.

ondragenter
Fires on the target element when the user drags the object to a valid drop target.

ondragleave
Fires on the target object when the user moves the mouse out of a valid drop target during a drag operation.

ondragover
Fires on the target element continuously while the user drags the object over a valid drop target.

ondragstart
Fires on the source object when the user starts to drag a text selection or selected object.

ondrop
Fires on the target object when the mouse button is released during a drag-and-drop operation.

onerror
Fires when an error occurs during object loading.

onerrorupdate
Fires on a databound object when an error occurs while updating the associated data in the data source object.

onfilterchange
Fires when a visual filter changes state or completes a transition.

onfinish
Fires when marquee looping is complete.

onfocus
Fires when the object receives focus.

onfocusin
Fires for an element just prior to setting focus on that element.

onfocusout
Fires for the current element with focus immediately after moving focus to another element.

onhelp
Fires when the user presses the F1 key while the browser is the active window.

onkeydown
Fires when the user presses a key.

onkeypress
Fires when the user presses an alphanumeric key.

onkeyup
Fires when the user releases a key.

onlayoutcomplete
Fires when the print or print preview layout process finishes filling the current LayoutRect object with content from the source document.

onload
Fires immediately after the browser loads the object.

onlosecapture
Fires when the object loses the mouse capture.

onmousedown
Fires when the user clicks the object with either mouse button.

onmouseenter
Fires when the user moves the mouse pointer into the object.

onmouseleave
Fires when the user moves the mouse pointer outside the boundaries of the object.

onmousemove
Fires when the user moves the mouse over the object.

onmouseout
Fires when the user moves the mouse pointer outside the boundaries of the object.

onmouseover
Fires when the user moves the mouse pointer into the object.

onmouseup
Fires when the user releases a mouse button while the mouse is over the object.

onmousewheel
Fires when the wheel button is rotated.

onmove
Fires when the object moves.

onmoveend
Fires when the object stops moving.

onmovestart
Fires when the object starts to move.

onpaste
Fires on the target object when the user pastes data, transferring the data from the system clipboard to the document.

onpropertychange
Fires when a property changes on the object.

onreadystatechange
Fires when the state of the object has changed.

onreset
Fires when the user resets a form.

onresize
Fires when the size of the object is about to change.

onresizeend
Fires when the user finishes changing the dimensions of the object in a control selection.

onresizestart
Fires when the user begins to change the dimensions of the object in a control selection.

onrowenter
Fires to indicate that the current row has changed in the data source and new data values are available on the object.

onrowexit
Fires just before the data source control changes the current row in the object.

onrowsdelete
Fires when rows are about to be deleted from the recordset.

onrowsinserted
Fires just after new rows are inserted in the current recordset.

onscroll
Fires when the user repositions the scroll box in the scroll bar on the object.

onselect
Fires when the current selection changes.

onselectionchange
Fires when the selection state of a document changes.

onselectstart
Fires when the object is being selected.

onstart
Fires at the beginning of every loop of the marquee object.

onstop
Fires when the user clicks the Stop button or leaves the Web page.

onsubmit
Fires when a FORM is about to be submitted.

onunload
Fires immediately before the object is unloaded.

看看这里有没有,如果没有我再找找。
chaoren1641 2006-11-04
  • 打赏
  • 举报
回复
<body unload="alert('???')" 这样是否可行?
shotr 2006-11-04
  • 打赏
  • 举报
回复
那我在关闭Tag的时候它确实弹出一个MessageBox了,这是怎么做到的?
谢谢~~
yoshikage 2006-11-04
  • 打赏
  • 举报
回复
关闭整个IE的知道,关闭Tag不知道。
shotr 2006-11-04
  • 打赏
  • 举报
回复
是不是有个onclose的事件之类的?
shotr 2006-11-04
  • 打赏
  • 举报
回复
IE就不是这种情况,要浏览x个页面的话得打开x个IE窗口
shotr 2006-11-04
  • 打赏
  • 举报
回复
只打开一个浏览器进程但能浏览多个页面,比如Maxthon、GB等浏览器
yoshikage 2006-11-04
  • 打赏
  • 举报
回复
讲得白话一点,别用文言文。。嘿嘿。
yoshikage 2006-11-04
  • 打赏
  • 举报
回复
标签页是什么东东?

62,046

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧