js弹出框,禁刷新
<!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=gb2312" />
<title>a</title>
<SCRIPT langauge='javasript'>
//禁止用F5键
function document.onkeydown()
{
if ( event.keyCode==116)
{
event.keyCode = 0;
event.cancelBubble = true;
return false;
}
} //禁止右键弹出菜单
function document.oncontextmenu()
{
return false;
}
function openwin(url) {
var cw=window.open(url, "", "height=screen.height, width=screen.width, top=0,left=0 , toolbar =no, menubar=no, scrollbars=no, resizeable=no, location=no, status=no");
cw.resizeTo(screen.width,screen.height);cw.moveTo(0,0);window.opener=null;window.open('', '_self'); window.close();
}
</SCRIPT>
</head>
<body onload="openwin('test.html')">
</body>
</html>
备注:ie8下才有效 window.opener=null;window.open('', '_self'); window.close();关闭该窗口,不弹出提示框
JQuery弹出层效果制作 JQuery插件TipsWindown 1.1 http://www.nowamagic.net/jquery/jquery_JqueryPopup.php
location.href的用法 http://www.cnblogs.com/chinafine/articles/1831445.html
*.location.href 用法:
top.location.href=”url” 在顶层页面打开url(跳出框架)
self.location.href=”url” 仅在本页面打开url地址
parent.location.href=”url” 在父窗口打开Url地址
this.location.href=”url” 用法和self的用法一致
if (top.location == self.location) 判断当前location 是否为顶层来 禁止frame引用
<link href="./css/tipswindown.css" rel="stylesheet">
<script src="./js/tipswindown.js"></script>
<script src="../js/jquery-1.7.2.min.js"></script> //上上级
<script>
function openViewAllVoice1(){
//parent.location.href="check_time_arrange.html";
//location.href="check_time_arrange.html";
tipsWindown("批量审核","iframe:pass_or_not.html","350","300","true","","true","leotheme");
}
</script>
//页面的跳转。 如果button是submit类型,必须用嵌入跳转
<button class="btn-primary btn btntext-top" onClick="openViewAllVoice1();">批量审核</button>
<button type="submit" class="btn-primary btn btntext-top" style="margin-left:33%;margin-top:-1px;" onClick="window.location.reload('project_check.html');">保存</button>
//关闭子窗口,并且刷新 window.parent.location.reload();
js弹出框,禁刷新的更多相关文章
- 【转】js弹出框、对话框、提示框、弹窗总结
js弹出框.对话框.提示框.弹窗总结 一.js的三种最常见的对话框 //====================== JS最常用三种弹出对话框 ======================== //弹 ...
- js js弹出框、对话框、提示框、弹窗总结
js弹出框.对话框.提示框.弹窗总结 一.JS的三种最常见的对话框 //====================== JS最常用三种弹出对话框 ======================== //弹 ...
- bootstrap中popover.js(弹出框)使用总结+案例
bootstrap中popover.js(弹出框)使用总结+案例 *转载请注明出处: 作者:willingtolove: http://www.cnblogs.com/willingtolove/p/ ...
- 5月12日上课笔记-js 弹出框、函数、程序调试、基本事件、浏览器对象模型
一.弹出框 a.提示框 alert(); b.输入框 prompt(); c.确认框 confirm(); var flag= confirm("确认删除吗?"); 二.js程序调 ...
- JS弹出框插件zDialog再次封装
zDialog插件网址:http://www.jq22.com/jquery-info2426 再次封装zDialog的代码: (function ($) { $.extend({ iDialog: ...
- 如何妥善处理WebBrowser对Javascript的错误问题,阻止JS弹出框,提高用户体验
由于项目需求,最近转战客户端,开始搞浏览器开发.众所周知,现在在微软平台上开发浏览器,最常用的方法就是扩展Webbrowser,但是首先要清楚的是,WebBrowser控件仅仅是对WebBrowser ...
- 转:WebDriver(Selenium2) 处理可能存在的JS弹出框
在自动化测试过程中,有些情况下我们会遇到一些潜在的Javascript弹出框.(即某些条件下才会出现,不是固定出现),然后如果当这种弹出框出现,我们没有加以处理,WebDriver将无法进行下一步的操 ...
- WebDriver(Selenium2) 处理可能存在的JS弹出框
http://uniquepig.iteye.com/blog/1703103 在自动化测试过程中,有些情况下我们会遇到一些潜在的Javascript弹出框.(即某些条件下才会出现,不是固定出现),然 ...
- java方法里面生成js弹出框
核心代码:方法参数要有response response.setContextType("text/html;charset=UTF-8"); PrintWrite out = r ...
- lhgdialog.js弹出框
官方学习网址: http://www.lhgdialog.com/ 个人认为它的样式不太好调,除此之外它也是一款实用的弹出框,专业的用来提示文字,消息,按钮添加function().ifame: 以下 ...
随机推荐
- ORACLE的DUAL表及DB2的SYSIBM.SYSDUMMY1
在ORACLE中,数据库用户通过访问DUAL表获取一些系统信息:DB2中,相应的表为SYSIBM.SYSDUMMY1表 ORACE中举例: SELECT SYSDATE FROM DUAL;获取当前日 ...
- 图像处理中的matlab使用
图像的矩阵表示 类和图像类型 虽然使用的是整数坐标, 但 MATLAB 中的像素值(亮度)并未限制为整数. 表 1-1 列出了 MATLAB 和图像处理工具箱为描述像素值而支持的各种类. 表中的前 8 ...
- 3.Java异常进阶
3.JAVA异常进阶 1.Run函数中抛出的异常 1.run函数不会抛出异常 2.run函数的异常会交给UncaughtExceptionhandler处理 3.默认的UncaughtExceptio ...
- IIS服务器允许跨域配置
<configuration> <system.webServer> <httpProtocol> <customHeaders> <add na ...
- iOS--NSBundle理解
NSBundle:官方文档解释:An NSBundle object represents a location in the file system that groups code and r ...
- 2016-2017 ACM-ICPC, NEERC, Southern Subregional Contest
A. Toda 2 按题意模拟即可. #include <bits/stdc++.h> using namespace std ; typedef pair < int , int ...
- ZeroMQ接口函数之 :zmq_z85_decode – 从一个用Z85算法生成的文本中解析出二进制密码
ZeroMQ 官方地址 :http://api.zeromq.org/4-0:zmq_z85_decode zmq_z85_decode(3) ØMQ Manual - ØMQ/4.1 ...
- oracle 取小数位数
select ltrim('124532.62879'-floor('124532.62879'),'0.') from dual;select length(66695) from dual; 这两 ...
- NOSQL场景梳理
Redis 场景:缓存,Session,消息发布订阅,产品属性分析,订单购买等强事务,计数等 Memcached 场景:读密集,写一般的缓存,Session MongoDB 场景:数据显示,查 ...
- Docking Windows Phone controls to the bottom of a StackPanel
<Grid> <Grid.RowDefinitions> <RowDefinition Height="*" /> <RowDefinit ...