码][JavaScript]代码 跳至 [1] [全屏预览]
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
实现方法 引用jquery和,jqprint到您的页面 <script language= "javascript" src= "jquery-1.4.4.min.js" ></script>
<script language= "javascript" src= "jquery.jqprint-0.3.js" ></script>
js <script language= "javascript" >
function a(){
$( "#ddd" ).jqprint();
}
</script> html <div id= "ddd" >
<table>
<tr>
<td>test</td>
<td>test</td>
<td>test</td>
<td>test</td>
<td>test</td>
</tr>
</table>
</div> <input type= "button" onclick= " a()" value= "打印" />
|