ie打印兼容问题 在项目写了一个打印功能。用的是iframe、。其中需要打印的信息就通过ajax获取的。就一个层。问题出来了。打印的时候ie6,7没有问题。全部都打印出来了。IE8 只能打印1页。google了2天。修改无数。无解。有没有遇到这种情况的。 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 var HKEY_Root,HKEY_Path,HKEY_Key; HKEY_Root="HKEY_CURRENT_USER"; HKEY_Path="\\Software\\Microsoft\\Internet Explorer\\PageSetup\\"; //设置网页打印的页眉页脚为空 function PageSetup_Null() { try { var Wsh=new ActiveXObject("WScript.Shell"); HKEY_Key="header"; Wsh.RegWrite(HKEY_Root+HKEY_Path+HKEY_Key,""); HKEY_Key="footer"; Wsh.RegWrite(HKEY_Root+HKEY_Path+HKEY_Key,""); } catch(e){} } PageSetup_Null();var count=0;function hiddentr(id){ document.getElementById(id).style.display='none';}function DP(div , divclass) { if (window.print) { $('.'+divclass).html(''); var Div1 = $('#'+div).html(); if(Div1==null) { return false; } var body ='<table width="640" border="0" cellspacing="0" cellpadding="5">' + ' <tr> ' + ' <td> ' + Div1 + ' </td>' + ' </tr>' + '</table>'; document.body.innerHTML = '<center>' + body + '</center>'; window.print(); window.history.go(0); }}传过来的div是ajax获取的返回值 关于many-to-one的添加和修改的问题,急急急~~~~ ActiveX插件问题?请高手帮忙啊 spring问题 JSP中含有用SERVLET生成的验证码 高分求jsp的wap留言板源码 jsp的radio的checked问题 Hibernate持久化类属性与table栏位对应问题,高手指点. 一个有关<jsp:useBean>标签中四种scope属性的问题,谢谢!!!马上送分!!! 请问weblogic如何配置struts!!!! 哪里有<<JAVA编程思想>>电子书下载 手机web开发? 关于struts2配置文件struts.xml路径问题
var HKEY_Root,HKEY_Path,HKEY_Key;
HKEY_Root="HKEY_CURRENT_USER";
HKEY_Path="\\Software\\Microsoft\\Internet Explorer\\PageSetup\\";
//设置网页打印的页眉页脚为空
function PageSetup_Null()
{
try
{
var Wsh=new ActiveXObject("WScript.Shell");
HKEY_Key="header";
Wsh.RegWrite(HKEY_Root+HKEY_Path+HKEY_Key,"");
HKEY_Key="footer";
Wsh.RegWrite(HKEY_Root+HKEY_Path+HKEY_Key,"");
}
catch(e){}
}
PageSetup_Null();
var count=0;
function hiddentr(id){
document.getElementById(id).style.display='none';
}
function DP(div , divclass) {
if (window.print)
{
$('.'+divclass).html('');
var Div1 = $('#'+div).html();
if(Div1==null) {
return false;
}
var body ='<table width="640" border="0" cellspacing="0" cellpadding="5">' +
' <tr> ' +
' <td> ' + Div1 +
' </td>' +
' </tr>' +
'</table>';
document.body.innerHTML = '<center>' + body + '</center>';
window.print();
window.history.go(0);
}
}传过来的div是ajax获取的返回值