<script>
window.attachEvent('onunload',function(){alert('尊敬的客户,为了方便核对机票或酒店信息建议您收藏本页!');window.external.addFavorite('http://www.','上海');});
</script>
window.attachEvent('onunload',function(){alert('尊敬的客户,为了方便核对机票或酒店信息建议您收藏本页!');window.external.addFavorite('http://www.','上海');});
</script>
解决方案 »
- js 操作DOM
- jquery放大镜插件源图片过小问题
- 关于传值和刷新页面的问题
- 一个隐藏、显示内容的js求助
- 关于创建 FileSystemObject 对象
- 请教如何confirm()函数怎么样出现3个按钮,不要用showmodaldialog
- 如何用js 控制一组.已知avi & mpeg 文件的连续播放.网页上有media 控件
- window.open()打开一个网页,怎样能自动为其填写好表单并提交呢?
- 问:想要鼠标滑到某张图片或文字上是显示注解。怎么弄?
- vue 里报错 Uncaught TypeError: Cannot read property 'style' of null
- event.returnValue 到底是什么含义,有什么好处?能给我一个例子看看吗?
- JS关闭页面问题
window.attachEvent('onunload', function(){
if (confirm('尊敬的客户,为了方便核对机票或酒店信息建议您收藏本页!')) {
window.external.addFavorite('http://www.163.com', '上海');
}
});
Navigate to another location by entering a new address or selecting a Favorite.
Click the Back, Forward, Refresh, or Home button.
Click on an anchor that refers the browser to another Web page.
Invoke the anchor?A HREF="../methods/click.html">click method.
Invoke the document?A HREF="../methods/write.html">write method.
Invoke the document?A HREF="../methods/open_1.html">open method.
Invoke the document?A HREF="../methods/close_1.html">close method.
Invoke the window?A HREF="../methods/close_0.html">close method.
Invoke the window?A HREF="../methods/open_0.html">open method, providing the possible value _self for the window name.
Invoke the window?A HREF="../methods/navigate.html">navigate or NavigateAndFind method.
Invoke the location?A HREF="../methods/replace.html">replace method.
Invoke the location?A HREF="../methods/reload.html">reload method.
Specify a new value for the location?A HREF="../properties/href_3.html">href property.
Submit a form to the address specified in the ACTION attribute via the INPUT type=submit control, or invoke the submit method
当你连接在其他页面时选择在新窗口打开,就不会触发该事件了。