<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    溫馨提示:您的每一次轉(zhuǎn)載,體現(xiàn)了我寫此文的意義!!!煩請您在轉(zhuǎn)載時(shí)注明出處http://m.tkk7.com/sxyx2008/謝謝合作!!!

    雪山飛鵠

    溫馨提示:您的每一次轉(zhuǎn)載,體現(xiàn)了我寫此文的意義!!!煩請您在轉(zhuǎn)載時(shí)注明出處http://m.tkk7.com/sxyx2008/謝謝合作!!!

    BlogJava 首頁 新隨筆 聯(lián)系 聚合 管理
      215 Posts :: 1 Stories :: 674 Comments :: 0 Trackbacks
    方法一
    <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
    <%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
    %>

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
      
    <head>
        
    <base href="<%=basePath%>">
        
        
    <title>table</title>
        
        
    <meta http-equiv="pragma" content="no-cache">
        
    <meta http-equiv="cache-control" content="no-cache">
        
    <meta http-equiv="expires" content="0">    
        
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
        
    <meta http-equiv="description" content="This is my page">
        
    <!--
        <link rel="stylesheet" type="text/css" href="styles.css">
        
    -->
        
    <style type="text/css">
            body
    {
                margin
    : 0,0,0,0;
            
    }
            td
    {
                border
    :1px solid;
                border-collapse
    : collapse;
                border-color
    : blue;
            
    }
        
    </style>
        
        
    <script type="text/javascript">
            
    function printdiv(printpage){
                
    var headstr = "<html><head><title></title></head><body>";
                
    var footstr = "</body>";
                
    var newstr = document.all.item(printpage).innerHTML;
                
    var oldstr = document.body.innerHTML;
                document.body.innerHTML 
    = headstr+newstr+footstr;
                window.print(); 
                document.body.innerHTML 
    = oldstr;
                
    return false;
            } 
        
    </script>
      
    </head>
      
      
    <body>
       
    <br>
    <div id="printdiv">
        
    <table width="80%"  border="1px solid" bordercolor="blue" id="mytable" style="border-collapse: collapse;">
           
    <caption>雇員明細(xì)表</caption>
           
    <tr>
               
    <th>編號(hào)</th>
               
    <th>姓名</th>
               
    <th>性別</th>
               
    <th>年齡</th>
           
    </tr>
           
    <tr>
               
    <td>1</td>
               
    <td>張三</td>
               
    <td></td>
               
    <td>28</td>
           
    </tr>
           
    <tr>
               
    <td>2</td>
               
    <td>張三</td>
               
    <td></td>
               
    <td>28</td>
           
    </tr>
           
    <tr>
               
    <td>3</td>
               
    <td>張三</td>
               
    <td></td>
               
    <td>28</td>
           
    </tr>
           
    <tr>
               
    <td>4</td>
               
    <td>張三</td>
               
    <td></td>
               
    <td>28</td>
           
    </tr>
           
    <tr>
               
    <td>5</td>
               
    <td>張三</td>
               
    <td></td>
               
    <td>28</td>
           
    </tr>
           
    <tr>
               
    <td>6</td>
               
    <td>張三</td>
               
    <td></td>
               
    <td>28</td>
           
    </tr>
       
    </table>
       
    <img alt="點(diǎn)我試試看" src="http://www.google.com.hk/intl/zh-CN/images/logo_cn.png">
    </div>
       
    <input type="button" value="打印表格" onclick="printdiv('printdiv');">
      
    </body>
    </html>
    方法二
    <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
    <%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
    %>

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
      
    <head>
        
    <base href="<%=basePath%>">
        
        
    <title>table</title>
        
        
    <meta http-equiv="pragma" content="no-cache">
        
    <meta http-equiv="cache-control" content="no-cache">
        
    <meta http-equiv="expires" content="0">    
        
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
        
    <!--
        <link rel="stylesheet" type="text/css" href="styles.css">
        
    -->
        
    <style type="text/css">
            body
    {
                margin
    : 0,0,0,0;
            
    }
            td
    {
                border
    :1px solid;
                border-collapse
    : collapse;
                border-color
    : blue;
            
    }
        
    </style>
        
        
    <!-- 此樣式用來標(biāo)記那些不需要被打印的內(nèi)容 -->
        
    <style type="text/css" media=print>
        .noprint
    {display : none }
        
    </style>
        
        
      
    </head>
      
    <body>
       
    <br>
    <div id="printdiv">
        
    <table width="80%"  border="1px solid" bordercolor="blue" id="mytable" style="border-collapse: collapse;">
           
    <caption>雇員明細(xì)表</caption>
           
    <tr>
               
    <th>編號(hào)</th>
               
    <th>姓名</th>
               
    <th>性別</th>
               
    <th>年齡</th>
           
    </tr>
           
    <tr>
               
    <td>1</td>
               
    <td>張三</td>
               
    <td></td>
               
    <td>28</td>
           
    </tr>
           
    <tr>
               
    <td>2</td>
               
    <td>張三</td>
               
    <td></td>
               
    <td>28</td>
           
    </tr>
           
    <tr>
               
    <td>3</td>
               
    <td>張三</td>
               
    <td></td>
               
    <td>28</td>
           
    </tr>
           
    <tr>
               
    <td>4</td>
               
    <td>張三</td>
               
    <td></td>
               
    <td>28</td>
           
    </tr>
           
    <tr>
               
    <td>5</td>
               
    <td>張三</td>
               
    <td></td>
               
    <td>28</td>
           
    </tr>
           
    <tr>
               
    <td>6</td>
               
    <td>張三</td>
               
    <td></td>
               
    <td>28</td>
           
    </tr>
       
    </table>
       
    <img alt="點(diǎn)我試試看" src="http://www.google.com.hk/intl/zh-CN/images/logo_cn.png" class="noprint">
    </div>
       
    <object id="WebBrowser" width="0" height="0" classid="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2">
       
    </object>
       
    <input type="button" name="Button" value="打印設(shè)置" onclick="document.all.WebBrowser.ExecWB(8,1)" class="noprint">
       
    <input type="button" name="Button" value="打印" onclick="document.all.WebBrowser.ExecWB(6,1)" class="noprint">
       
    <input type="button" name="Button" value="打印預(yù)覽" onclick="document.all.WebBrowser.ExecWB(7,1)" class="noprint">
      
    </body>
    </html>
    posted on 2010-12-08 14:01 雪山飛鵠 閱讀(1512) 評論(0)  編輯  收藏 所屬分類: js
    主站蜘蛛池模板: 精品日韩亚洲AV无码一区二区三区| 四虎精品免费永久免费视频| 亚洲人成网站在线播放vr| 女人让男人免费桶爽30分钟| 久草免费福利视频| 四虎影视在线看免费观看| 精品国产成人亚洲午夜福利| 久久亚洲AV无码精品色午夜| 亚洲午夜久久久久久噜噜噜| 免费v片视频在线观看视频| 毛片A级毛片免费播放| 蜜臀98精品国产免费观看| 好久久免费视频高清| 伊人久久国产免费观看视频| 亚洲JIZZJIZZ妇女| 亚洲一区二区三区高清不卡 | 亚洲一卡2卡3卡4卡乱码 在线| 久久久久久a亚洲欧洲aⅴ| 亚洲视频人成在线播放| 免费国产成人高清在线观看麻豆 | 亚洲日本国产综合高清| 亚洲国产精品乱码在线观看97 | 亚欧在线精品免费观看一区| 一级毛片免费毛片一级毛片免费| 成人爽a毛片免费| a级毛片视频免费观看| 国产做国产爱免费视频| 久久精品无码专区免费| aaa毛片视频免费观看| 久草免费福利在线| 中文在线免费不卡视频| 中文字幕免费观看全部电影| 一个人看www免费高清字幕| 一级做受视频免费是看美女| 国产成人无码免费网站| 插鸡网站在线播放免费观看| 热久久这里是精品6免费观看| 你懂的网址免费国产| a级片免费在线播放| 无码人妻精品中文字幕免费| 精品熟女少妇av免费久久|