我的文件 index.htm<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>有限公司</title>
<meta http-equiv="refresh" content="100;url=index.html">
</head><body>
<a href="javascript:WindowClose();">关闭当前窗口</a>
</body>
<script language="javascript">
function WindowClose(){
window.close();
}
</script>
</html>以上文件在以 http://***.***.***.***/index.htm 方式访问(***表示IP)就可以执行window.close();但以 http://www.***.com/index.htm 方式访问(***表示域名)就无法执行window.close();有什么解决之道,还望高手支招!
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>有限公司</title>
<meta http-equiv="refresh" content="100;url=index.html">
</head><body>
<a href="javascript:WindowClose();">关闭当前窗口</a>
</body>
<script language="javascript">
function WindowClose(){
window.close();
}
</script>
</html>以上文件在以 http://***.***.***.***/index.htm 方式访问(***表示IP)就可以执行window.close();但以 http://www.***.com/index.htm 方式访问(***表示域名)就无法执行window.close();有什么解决之道,还望高手支招!
解决方案 »
- 用js来检测客户机上是否安装了某个插件 火狐
- Jquery--end()使用的问题
- JSP中include指令和include行为区别
- 如何修改该js图片轮换代码,才能在同网页重复使用多次
- JSCalendar1.0
- 如何获得光标附近的text的字体,做过html编辑器的来
- getElementById 取得 checkbox 处于选中状态的 的条数
- 如何禁止刷新页面呢?
- 多个同名CHECKBOX,当没选中的时候该一行的输入框都不可用,另外还需要按照用户点击的顺序给它赋值,第一个选中的为1,第二个选中的为2,
- 如何使用js获取开机用户名?
- 这种动态菜单如何实现?
- 大家帮我看看这句话为何执行不了!
前后运行些测试代码,看看是不是都能执行到。
在WINDOW与CLOSE中间加个“.”
这个是自定义函数啊。