1.firefox打印兼容问题:

 <HTML>
<HEAD>
<TITLE>JavaScript利用IE内置打印控件IEWebBrowser进行打印/打印页面设置/打印预览/控制分页打印</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gbk" />
<SCRIPT type="text/javascript">
var hkey_root,hkey_path,hkey_key;
hkey_root="HKEY_CURRENT_USER";
<!--地址的写法很严格的用双斜杠-->
hkey_path="\Software\Microsoft\Internet Explorer\PageSetup";
//设置网页打印的页眉页脚为空
function pagesetup_null(){
try{
var RegWsh = new ActiveXObject("WScript.Shell");
hkey_key="\header";
RegWsh.RegWrite(hkey_root+hkey_path+hkey_key,"");
hkey_key="\footer";
RegWsh.RegWrite(hkey_root+hkey_path+hkey_key,"");
}catch(e){}
}
//设置网页打印的页眉页脚为默认值
function pagesetup_default(){
try{
var RegWsh = new ActiveXObject("WScript.Shell");
hkey_key="\header" ;
RegWsh.RegWrite(hkey_root+hkey_path+hkey_key,"&w&b页码,&p/&P");
hkey_key="\footer";
RegWsh.RegWrite(hkey_root+hkey_path+hkey_key,"&u&b&d");
}catch(e){}
}
function printsetup(){
wb.execwb(8,1); // 打印页面设置
}
function printpreview(){
wb.execwb(7,1);// 打印页面预览
}
function printit() {
if (confirm('确定打印吗?')) {
wb.execwb(6,1);
}
}
</SCRIPT>
<!--media=print 这个属性说明可以在打印时有效-->
<!--希望打印时不显示的内容设置class="Noprint"样式-->
<!--希望人为设置分页的位置设置class="PageNext"样式-->
<style media="print">
<!--
.Noprint{display:none;}
.PageNext{page-break-after:always;}
-->
</style>
<style type="text/css">
<!--
.STYLE1 {font-size: 12px}
-->
</style>
</HEAD>
<BODY>
<!--IE内置打印控件IEWebBrowser-->
<OBJECT id=wb height=0 width=0 classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 name=wb></OBJECT>
<form>
<table width="600" border="1" align="center" cellpadding="0" cellspacing="0" class="STYLE1">
<tr>
<td height="17" colspan="3" bgcolor="#0099CC">>>监控信息>></td>
</tr>
<tr>
<td height="27" align="center" bgcolor="#C6C4DF">序号</td>
<td align="center" bgcolor="#C6C4DF">学校代码</td>
<td align="center" bgcolor="#C6C4DF">设备状态</td>
</tr>
<tr>
<td height="17" align="center">1</td>
<td height="17" align="center">1001</td>
<td height="17" align="center">正常</td>
</tr>
<tr class="PageNext"><!--希望人为设置分页的位置设置class="PageNext"样式-->
<td height="17" align="center">2</td>
<td height="17" align="center">1002</td>
<td height="17" align="center">正常</td>
</tr>
<tr>
<td height="17" align="center">3</td>
<td height="17" align="center">1003</td>
<td height="17" align="center">正常</td>
</tr>
</table>
<DIV align=center>
<!--希望打印时不显示的内容设置class="Noprint"样式-->
<INPUT onclick=javascript:printit() type=button value=打印 name=button_print class="Noprint"/>
<INPUT onclick=javascript:printsetup(); type=button value=打印页面设置 name=button_setup
class="Noprint" />
<INPUT onclick=javascript:printpreview(); type=button value=打印预览 name=button_show class="Noprint"
/>
<input type="button" value="清空页码" onclick=javascript:pagesetup_null() class="Noprint">
<input type="button" value="恢复页码" onclick=javascript:pagesetup_default() class="Noprint">
</DIV>
</form>
</BODY>
</HTML>
该Object "wb" 其实就是IE内置打印控件IEWebBrowser,设定 Width 和 Height 为0,在界面上就不显示控件的形状。
关于这个组件还有其它用法,列举如下:
WebBrowser.ExecWB(1,1) 打开
Web.ExecWB(2,1) 关闭现在所有的IE窗口,并打开一个新窗口
Web.ExecWB(4,1) 保存网页
Web.ExecWB(6,1) 打印
Web.ExecWB(6,6) 直接打印
Web.ExecWB(7,1) 打印预览
Web.ExecWB(8,1) 打印页面设置
Web.ExecWB(10,1) 查看页面属性
Web.ExecWB(17,1) 全选
Web.ExecWB(22,1) 刷新
Web.ExecWB(45,1) 关闭窗体无提示

上面所述的调用IE的内置打印控件,实现打印,打印页面设置以及打印预览等功能,只有IE支持,而Firefox不支持。

IE和Firefox都支持的一种打印方法就是调用js的方法window.print();进行打印。很easy

可以通过CSS控制实现页面的局部打印功能;

介绍两个关键的css

<style media="print">

.Noprint{DISPLAY:none;}

.PageNext{PAGE-BREAK-AFTER:always;}

</style>

第一个在无需打印的标签上添加(子标签也将不被打印),第二个在需要换行的标签处添加(该标签所表示的内容将在当前打印的一页内)

window.print()的缺点:1.用户体验不够友好,只有谷歌支持预览功能

2. 如果在触发window.print() 事件之前,我们想隐藏 "打印"这个按钮,很容易实现.但是如果 你再想显示出来 ,你无法捕获你取消打印时候的事件.所以造成这种效果,你点击打印时,按钮隐藏,但是你又不想打印了 点击取消,然后 打印按钮还是隐藏的,你只有重新刷新页面.

3.没有IE内核自带的打印方式中 打印参数设置的详细.

2.ubutun常用的解压命令大全

参考地址:http://blog.csdn.net/zad522/article/details/2770446

3.蓝灯使用之后,每次都需要开启蓝灯才能上网的解决办法

相信不少Lantern用户会遇到:不打开Lantern无法连接到互联网,QQ却可以登录,浏览器上网时报错等问题。其实这是由于Lantern未完全退出导致

1.使用window + R 输入regedit 进入注册表

2.然后找到HKEY_CURRENT_USERS\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections

3.删除这个这个目录即可

4.必要的情况下可以删除完之后重启电脑

4.正斜杠/与反斜杠\总结

http://blog.csdn.net/ylchou/article/details/7437809

如何在电脑上查看连接的WiFi的密码

http://jingyan.baidu.com/article/a3aad71aa4e1f8b1fb009697.html

如何在手机上查看连接的WIFI的密码

在手机上查看链接的WiFi的密码的条件:

1.要有WiFi密码查看器或者WiFi链接管理器

2.手机可以root

所以在手机上查看连接的WiFi的密码:下载WiFi密码查看器,然后root手机后就可以查看了

1.客观冷静的事物分析意识

2.积极的问题解决意识

10.如何快速的在Excel中复制10000行数据

1.首先选中要复制的数据

2.然后在下一行的输入A3:E10000

3.然后按下Ctrl+V粘贴就行了

the road of test的更多相关文章

  1. 【Codeforces 738C】Road to Cinema

    http://codeforces.com/contest/738/problem/C Vasya is currently at a car rental service, and he wants ...

  2. POJ 3204 Ikki's Story I - Road Reconstruction

    Ikki's Story I - Road Reconstruction Time Limit: 2000MS   Memory Limit: 131072K Total Submissions: 7 ...

  3. Codeforces #380 div2 C(729C) Road to Cinema

    C. Road to Cinema time limit per test 1 second memory limit per test 256 megabytes input standard in ...

  4. dp or 贪心 --- hdu : Road Trip

    Road Trip Time Limit: 1000ms, Special Time Limit:2500ms, Memory Limit:65536KB Total submit users: 29 ...

  5. HDU 1598 find the most comfortable road(最小生成树之Kruskal)

    题目链接: 传送门 find the most comfortable road Time Limit: 1000MS     Memory Limit: 32768 K Description XX ...

  6. 三分 --- CSU 1548: Design road

    Design road Problem's Link:   http://acm.csu.edu.cn/OnlineJudge/problem.php?id=1548 Mean: 目的:从(0,0)到 ...

  7. hdu 5861 Road 两棵线段树

    传送门:hdu 5861 Road 题意: 水平线上n个村子间有 n-1 条路. 每条路开放一天的价格为 Wi 有 m 天的操作,每天需要用到村子 Ai~Bi 间的道路 每条路只能开放或关闭一次. ( ...

  8. HDU4081 Qin Shi Huang's National Road System(次小生成树)

    枚举作为magic road的边,然后求出A/B. A/B得在大概O(1)的时间复杂度求出,关键是B,B是包含magic road的最小生成树. 这么求得: 先在原图求MST,边总和记为s,顺便求出M ...

  9. 杭电 1595 find the safest road

    find the safest road Time Limit: 10000/5000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Ot ...

  10. Codeforces Round #380 (Div. 2, Rated, Based on Technocup 2017 - Elimination Round 2)C. Road to Cinema 二分

    C. Road to Cinema time limit per test 1 second memory limit per test 256 megabytes input standard in ...

随机推荐

  1. 超详细 Linux 下编译安装Redis 以及php配套使用

    一.Linux 下安装Redis 下载地址:http://redis.io/download,下载最新文档版本. 把鼠标移到上图的绿色框上,就会显示下图提示:(直接右键复制链接就好) 本教程使用的旧版 ...

  2. dubbo学习小结

    dubbo学习小结 参考: https://blog.csdn.net/paul_wei2008/article/details/19355681 https://blog.csdn.net/liwe ...

  3. orecle 函数

    --创建函数语法 create [or replace] function [schema.]function_name (函数参数列表) --参数有IN.OUT.IN OUT三种类型:IN代表需要输 ...

  4. 主机不能访问虚拟机web服务的问题

    虚拟机是CentOs 7 iptables -Fiptables -P INPUT ACCEPT 参考:http://blog.csdn.net/abnereel/article/details/41 ...

  5. 利用正则提取discuz的正文内容

    源正文: [p=24, null, left][color=#000][font=宋体]近日,香港著名漫画家马荣成在香港举办的"[color=#ff660][url=http://cul.c ...

  6. jmeter-请求参数化

    新建个scv文件,将我们需要传递的数据写进去(建议用notepad等编辑器,直接用excel转csv格式有可能会出现不能识别参数) 有多个参数用,分开 另存为 2.jmeter 新建请求,选择函数对话 ...

  7. 前端分布引导插件IntroJs的使用

    在用户第一次使用网站的时候,一般会提供新手引导的提示,提示用户重要的功能使用,实现方法比较多,但是有一点,屏幕的自适应问题,大多数自己写的实现方法无非就是一个div遮罩层,然后再需要指引的位置放置一张 ...

  8. java-登陆界面

    <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding= ...

  9. NiceFish的ERROR in AppModule is not an NgModule问题

    大漠老师的angular2新手教程项目,nicefish刚开始下下来运行ng serve --prod --aot 是 出现ERROR in AppModule is not an NgModule ...

  10. redis、kafka、rabittMQ对比 (转)

    本文不对三者之间的性能进行对比,只是从三者的特性上区分他们,并指出三者的不用应用场景. 1.publish/subscribe 发布订阅模式如下图所示可以具有多个生产者和发布者,redis.kafka ...