IE内置控件 打印jsp页面设置

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>打印测试</title>
</head>

<body scroll="auto">
<div class="table_list" id="div1">
<br><center style="font-size: 20px;font-family:黑体 ">打印测试单</center><br>
<table align="center" width="100%" border="0" cellspacing="0" cellpadding="0" >
<tr>
<td align="center" class="th2">
我的学校
</td>
<td colspan="3">
 <label>西北大学</label>
</td>
</tr>
<tr>
<td align="center" class="th2">
我的家乡
</td>
<td colspan="3">
 <label>云南昭通</label>
</td>
</tr>
<tr>
<td align="center" class="th2">
我的爱好
</td>
<td colspan="3">
 <label>篮球、爬山、游泳...</label>
</td>
</tr>
<tr>
<td align="center" class="th2">
最喜欢的NBA球队
</td>
<td colspan="3">
 <label>迈阿密热火</label>
</td>
</tr>
<tr>
<td align="center" class="th2">
最喜欢的球员
</td>
<td colspan="3">
 <label>勒布朗.詹姆斯</label>
</td>
</tr>
<tr>
<td align="center" class="th2">
个人简介
</td>
<td colspan="3">
 <textarea id="reason" rows="5" cols="60" style="border: 0px;overflow: hidden;">有吗?</textarea>
</td>
</tr>
</table>
</div>
<div id=div0 align="center">
<OBJECT classid="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2" height=0 id=wb name=wb width=0>
</OBJECT>
<input type=button value=打印预览 onclick="printView()">
<input type=button value=直接打印 onclick="print()">
<input name=button onClick=document.all.wb.ExecWB(4,1) type=button value=另存为>
<input name=button onClick=document.all.wb.ExecWB(8,1) type=button value=页面设置>
<input name=button onClick=document.all.wb.ExecWB(45,1) type=button value=关闭>
</div>
</html>
<script type="text/javascript">
//打印阅览
function printView(){
eval("div0").style.visibility="hidden";
eval("div1").style.visibility="visible";
document.all.wb.ExecWB(7,1);
//重新将所有的内容全部显示
eval("div0").style.visibility="visible";
}

//直接打印
function print(){
eval("div0").style.visibility="hidden";
document.all.wb.ExecWB(6,6);
//重新将所有的内容全部显示
eval("div0").style.visibility="visible";
}
</script>

你可能感兴趣的:(jsp,IE,Class,input,div,button)