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

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

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

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

    雪山飛鵠

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

    BlogJava 首頁 新隨筆 聯系 聚合 管理
      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>雇員明細表</caption>
           
    <tr>
               
    <th>編號</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="點我試試看" 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>
        
        
    <!-- 此樣式用來標記那些不需要被打印的內容 -->
        
    <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>雇員明細表</caption>
           
    <tr>
               
    <th>編號</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="點我試試看" 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="打印設置" 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="打印預覽" onclick="document.all.WebBrowser.ExecWB(7,1)" class="noprint">
      
    </body>
    </html>
    posted on 2010-12-08 14:01 雪山飛鵠 閱讀(1511) 評論(0)  編輯  收藏 所屬分類: js
    主站蜘蛛池模板: 一级做a爰性色毛片免费| 亚洲色一色噜一噜噜噜| 在线观看日本亚洲一区| 日本人的色道免费网站| 亚洲精品韩国美女在线| 2021在线永久免费视频| 亚洲六月丁香六月婷婷色伊人| 13一14周岁毛片免费| 亚洲成a人不卡在线观看| 永久免费在线观看视频| 亚洲日韩乱码中文无码蜜桃| 无码国产精品一区二区免费 | 免费看大美女大黄大色| 亚洲va中文字幕| 国产三级免费电影| 青娱乐在线免费观看视频| 亚洲精品WWW久久久久久| 一级毛片免费一级直接观看| 中文字幕在亚洲第一在线| 99久久成人国产精品免费| 亚洲国产成人久久精品动漫 | 中文字幕第一页亚洲| 国产一区二区三区免费观看在线| 亚洲av午夜成人片精品网站 | 亚洲精品成人无码中文毛片不卡| 中文字幕无码一区二区免费| 亚洲色欲www综合网| 黄色成人网站免费无码av| 亚洲国产精品无码久久久秋霞1| 免费一级毛片免费播放| 一级特黄录像免费播放肥| 亚洲国产人成在线观看69网站 | 在线观看免费中文视频| 亚洲AV一二三区成人影片| 免费黄色毛片视频| 一级A毛片免费观看久久精品 | 免费欧洲美女牲交视频| 国产精品美女久久久免费 | 亚洲va中文字幕无码| a级黄色毛片免费播放视频| 亚洲精品成人网站在线播放|