【转】javascript IE下的关闭ie窗口出现提示关闭问题
在开发中经常会有直接关闭页面不弹出任何提示的需求,在IE6中可以直接象下面这样写就可以了
<mce:script language=javascript><!--
window.opener=null
window.close()
// --></mce:script>
这个问题在IE7中则有可能是出于某种安全考虑(因为在MS浏览器的竞争对手FF中,是不能关闭非脚本创建的窗口的),所以向上面这样写被限制,不可以直接关闭。不过MS还为我们程序员留了一条路,就是open空文件
//这样写就直接兼容IE6和IE7了
<mce:script language=javascript><!--
window.opener=null
window.open("","_self")
window.close();
// --></mce:script>
本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/lingxyd_0/archive/2009/03/13/3987981.aspx
相关文档:
打开一个 js 文件,编辑完成保存时,突然提醒下面的错误:
Save could not be completed.
Reason:
Some characters cannot be mapped using “ISO-8859-1″ character encoding. Either change the encoding or remove the characters which are not supported by the “ISO-8859-1″ character ......
在Javascript中,所有开发者定义的类都可以作为基类,但出于安全性考虑,本地类和宿主类不能作为基类,这样可以防止公用访问编译过的浏览器级的代码,因为这些代码可以被用于恶意攻击。
选定基类后,就可以创建它的子类了。是否使用基类完全由你决定。有时 ......
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>随机 ......
<body>
<form id="form1" runat="server">
请选择你的爱好:
<div>
<input name="Che" type="checkbox" />足球
& ......