web打印

<%@ page language="java" import="java.util.*" pageEncoding="GB18030"%>
<%@ include file="/common/common.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>

<title>暂住证</title>
<link href="../css/style1.css" rel="stylesheet" type="text/css"/>
<style type="text/css">
.div2 {
font-family: "宋体";
font-size: 14px;
line-height: 40px;
color: #000000;
text-indent: 2px;
}
#bg {
position:absolute;
width:183.5mm;
height:263mm;
z-index:-1;
left: 0px;
top: 0px;
}
#table1div{
position:absolute;
width:146.5mm;
height:181mm;
z-index:4;

}

.td1width
{
width:24mm;
}
.td2width
{
width:27.5mm;
}
.td3width
{
width:19mm;
}

.td4width
{
width:8mm;
}

.td5width
{
width:10mm;
}

.td6width
{
width:6.5mm;
}

.td7width
{
width:20.5mm;
}
.td8width
{
width:27mm;
}
.trheight10
{
height:9.5mm;
}
.px13
{
font-size:13px;
}
#Layer1 {
position:absolute;
width:388px;
height:113px;
z-index:5;
left: 255px;
top: 805px;

}
</style>
</head>

<body bgcolor="#ffffff" leftmargin="0" topmargin="0">
<div name="printDiv" id="printDiv" >
<table class="div2" width="305" border="0" align="center">
<tr >
<td width="65" height="12" class="div2" >姓 名</td>
<td width="55" class="div2">${zzrkjbxx.ZZRKXM }</td>
<td width="65" class="div2">出生日期</td>
<td width="40" class="div2">${zzrkjbxx.ZZRKCSRQ }</td>
<td rowspan=4" width="70" valign="top"><img src="/showimage.do?method=showPrintImage&ryid=${zzrkjbxx.ZZRKRYID}" border="0" align="absbottom" style="width:70;"></td>
</tr>
<tr>
<td class="div2">性 别</td>
<td class="div2">${zzrkjbxx.ZZRKXB }</td>
<td class="div2">民 族</td>
<td class="div2">${zzrkjbxx.ZZRKMZ }</td>
</tr>
<tr>
<td class="div2">婚姻状况</td>
<td class="div2">${zzrkfjxx.ZZRKHYZK }</td>
<td class="div2">暂住事由</td>
<td class="div2">${zzrkzzxx.ZZRKZZSY }</td>
</tr>
<tr>
<td class="div2" colspan="4">户口所在地  ${zzrkjbxx.ZZRKHKSZDZZ }</td>
</tr>
<tr>
<td class="div2">住 址</td>
<td colspan="4" class="div2">${zzrkzzxx.ZZRKJZDZ }</td>

</tr>
<tr>
<td class="div2">服务处所</td>
<td colspan="4" class="div2">${zzrkzzxx.ZZRKFWCS }</td>

</tr>
<tr>
<td class="div2">身份证号</td>
<td colspan="4" class="div2">${zzrkjbxx.ZZRKGMSFHM }</td>

</tr>
</table>
<table width="305" border="0" align="center">
<tr>
<td class="div2" valign="top" height="30">${fn:substring(zzrkzzxx.ZZRKJZZQFRQ,0,4)}   
年 ${fn:substring(zzrkzzxx.ZZRKJZZQFRQ,4,6)} 月${fn:substring(zzrkzzxx.ZZRKJZZQFRQ,6,8)}日签发 
有效日期 ${zzrkzzxx.ZZRKYXQX }</td>
</tr>
</table>
</div>
<table border="0" align="center" cellpadding="0" cellspacing="0" style="width:200mm;">
<tr>
<td style="border-bottom:1px dotted #000000;" height="20"> </td>
</tr>
<tr>
<td> </td>
</tr>
</table>
<div align="center">
<table border="0" align="center" cellpadding="0" cellspacing="0" style="width:320">
<tr>
<td><input type="button" value="打印" onClick="javascript:printObj(printDiv,'6','6')" class="NOPRINT"
style="height:20px;"></td>
<td>
<input type="button" value="页面设置" onClick="javascript:printObj(printDiv,'8','1')" class="NOPRINT"
style="height:20px;">
</td>
<td><input type="button" value="打印预览" onClick="javascript:printObj(printDiv,'7','1')" class="NOPRINT"
style="height:20px;"></td>
<td><input type="button" value="关闭" onClick="javascript:window.close();" class="NOPRINT"
style="height:20px;"></td>
<td> </td>
</tr>
</table>
</div>
</body>
</html>

<script language="javascript">
function printObj(obj, p1, p2)
{
var printFlag = true;
if (p1 == "6")
{
printFlag = false;
if (confirm('确定要直接打印吗?')) printFlag = true;
}
if (printFlag)
{
var printWindow = window.open("", "_blank");
var str = "<OBJECT id=WebBrowser classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 height=0 width=0></OBJECT>"
var s = "<!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\">\r\n";
s += "<head>";
s += "<link href='../css/printTable.css' rel='stylesheet' type='text/css' />";
s += "<meta http-equiv='Content-Type' content='text/html; charset=GB18030'>";
s += "</head>";
s += "<body bgcolor='#ffffff' leftmargin='0' topmargin='0'>";
s += obj.innerHTML;
s += "</body>";
s += "</html>";
printWindow.document.write(s);
printWindow.document.close();
printWindow.document.body.insertAdjacentHTML("beforeEnd", str);
printWindow.document.all.WebBrowser.ExecWB(p1, p2);
printWindow.close();

}
}

function printReturn(cho)
{
if (cho=="zjgl_grsl")
location.replace("../data_search.jsp?ModuleId=<%//=//ModuleId%>&chose=zjgl_grsl");
else
location.replace("lr_slqh.jsp");
}

function printStr(div)
{
var pwin = window.open("review.jsp?div=" + div, "", 'height=600,width=600,top=0,left=0,toolbar=no,menubar=no,scrollbars=no, resizable=no,location=no, status=no');
pwin.document.close();
//这句很重要哦
}
</script>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值