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

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

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

    tinguo002

     

    WEB 打印,去頁碼、隱藏打印按鈕

    詳細參考:http://www.cnblogs.com/aidd2008/archive/2012/04/25/2469994.html

    JSP代碼如下:

    <%@page import="java.net.URLDecoder"%>
    <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
    <%
     String path = request.getContextPath();
     String basePath = request.getScheme() + "://"
       + request.getServerName() + ":" + request.getServerPort()
       + path + "/";
     String params = request.getParameter("params");
     params = URLDecoder.decode(params, "UTF-8");
     String[] arr = new String[8];
     if (params != null) {
      arr = params.split(",");
     }
     request.setAttribute("arr", arr);
    %>

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "<html>
    <head>
    <base href="<%=basePath%>">

    <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 media=print>
    .Noprint {
     display: none;
    }

    .PageNext {
     page-break-after: always;
    }

    </style>
    <style type="text/css">
    .helpSpan{ 
     margin-left:20px;
     cursor:pointer;
     display:inline-block;
     color:blue;
    }
    </style>
    <script type="text/javascript" src="<%=path%>/js/jquery-1.8.3.min.js"></script>
    <title>打印單</title>
    <object id="WebBrowser" width=0 height=0 classid="CLSID:8856F961-340A-11D0-A96B-00C04FD705A2"></object>
    <link rel="stylesheet" type="text/css"
     href="css/gzjrzcjys/editFrame.css" />
     <script type="text/javascript">
      function print1(){
       document.all.WebBrowser.ExecWB(6,6);
      }
      function wOpen(){
       $("span.open").hide();
       $("span.close").show();
       $("#helpContent").show();
      }
      function wClose(){
       $("span.open").show();
       $("span.close").hide();
       $("#helpContent").hide();
      }
       var hkey_root, hkey_path, hkey_key;
             hkey_root = "HKEY_CURRENT_USER";
             hkey_path = "
    \\software\\Microsoft\\Internet Explorer\\PageSetup\\";
             //設置網頁打印的頁眉頁腳邊距為空
             function pagesetup_null() {
                 try {
                     var RegWsh = new ActiveXObject("WScript.Shell");
                     hkey_key = "header";
                     RegWsh.RegWrite(hkey_root + hkey_path + hkey_key, "");
                     hkey_key = "footer";
                     RegWsh.RegWrite(hkey_root + hkey_path + hkey_key, "");
                     hkey_key = "margin_left";
                     RegWsh.RegWrite(hkey_root + hkey_path + hkey_key, "0.0");
                     hkey_key = "margin_right";
                     RegWsh.RegWrite(hkey_root + hkey_path + hkey_key, "0.0");
                     hkey_key = "margin_top";
                     RegWsh.RegWrite(hkey_root + hkey_path + hkey_key, "0.0");
                     hkey_key = "margin_bottom";
                     RegWsh.RegWrite(hkey_root + hkey_path + hkey_key, "0.0");
                 } catch (e) {
                  alert(e);
                 }
             }

      $(document).ready(function(){
       pagesetup_null();
      });
     </script>
    </head>

    <body>
     <div id="frame">
      <div id="frame_title">線下資金轉入申請</div>
      <div id="frame_content">

       <table class="content">
        <tr>
         <th>收款銀行:</th>
         <td><%=arr[0]%></td>
         <th>收款方全稱:</th>
         <td><%=arr[1]%></td>
        </tr>
        <tr>
         <th>收款方銀行賬號:</th>
         <td><%=arr[2]%></td>
         <th>充值碼:</th>
         <td><%=arr[3]%>(填寫在備注欄)</td>
        </tr>
        <tr>
         <th>匯款銀行:</th>
         <td><%=arr[4]%></td>
         <th>匯款方全稱:</th>
         <td><%=arr[5]%></td>
        </tr>
        <tr>
         <th>匯款賬號:</th>
         <td><%=arr[6]%></td>
         <th>匯款金額:</th>
         <td><%=arr[7]%>&nbsp;元</td>
        </tr>
       </table>


      </div>
      <div id="frame_bottom" class="Noprint">
       <a href="javascript:void(0)" class="button_toRound"><span
        style="font-size:14px;"
        onclick="print1()" class="Noprint">【打印】</span>
       </a>
      </div>
      <div style="padding:12px 5px;background-color:#ffffff" class="Noprint">
       備注: 請到網銀或者銀行辦理轉賬業務,轉賬匯款時,信息必須如實填寫,以避免無法如實到賬而給您的投資造成損失!</div>
     </div>

     <div style="width:750px;margin:auto;margin-top:150px;" class="Noprint">
      <div>友情鏈接:</div>
      <div>
       <table class="content">
        <tr>
         <td><a href="     </td>
         <td><a href="
          target="_blank">建設銀行</a>
         </td>
         <td><a href="
         </td>
         <td><a href="
         </td>
        </tr>
        <tr>
         <td><a href="
          target="_blank">光大銀行</a>
         </td>
         <td><a
          href="
          target="_blank">交通銀行</a>
         </td>
         <td><a href="
          target="_blank">興業銀行</a>
         </td>
         <td><a href="
          target="_blank">郵政儲蓄</a>
         </td>
        </tr>

       </table>
      </div>
     </div>
     <div style="width:750px;margin:auto;margin-top:50px;" class="Noprint">
      <div>幫助:點擊【打印】按鈕沒有反應。<span class="open helpSpan"  onclick="wOpen()">&gt;&gt;&gt;展開</span><span onclick="wClose()" class="close helpSpan" style="display:none;">&lt;&lt;&lt;收起</span></div>
      <div id="helpContent" style="display:none;">
       <p>需要將本站點添加為信任站點。共分為三步。</p>
       <p>第一步:打開IE瀏覽器的 Intenet選項</p>
       <div><img src="<%=path%>/images/open_Intenet_ie8.jpg"/></div>
       <p>或者</p>
       <div><img src="<%=path%>/images/open_Intenet_ie11.jpg"/></div>
       <p style="margin-top:20px;">第二步:添加信任站點</p>
       <div><img src="<%=path%>/images/setXinren_ie11.jpg"/></div>
       <p style="margin-top:20px;">第三步:允許控件運行</p>
       <div><img src="<%=path%>/images/setActive.jpg"/></div>
      </div>
     </div>
     <!--endprint-->
    </body>
    </html>

    代碼中所需圖片如下:








    歡迎大家訪問我的個人網站 萌萌的IT人

    posted on 2014-06-28 21:49 一堣而安 閱讀(446) 評論(0)  編輯  收藏 所屬分類: js_css

    導航

    統計

    常用鏈接

    留言簿(1)

    隨筆分類

    隨筆檔案

    收藏夾

    搜索

    最新評論

    閱讀排行榜

    評論排行榜

    主站蜘蛛池模板: 免费毛片在线播放| 国产一卡2卡3卡4卡无卡免费视频| 国产婷婷高清在线观看免费| 亚洲日韩国产一区二区三区在线| 97久久免费视频| 亚洲视频在线观看网址| 0588影视手机免费看片| 亚洲免费黄色网址| 成年女人18级毛片毛片免费| 亚洲国产日韩视频观看| 女人被免费视频网站| 亚洲国产成人久久一区二区三区| 日本特黄特色免费大片| 免费看内射乌克兰女| 亚洲中文字幕无码一久久区| 久久国产免费观看精品| 亚洲欧洲国产视频| 性色av免费观看| 无码 免费 国产在线观看91| 亚洲熟妇丰满多毛XXXX| 未满十八18禁止免费无码网站| 亚洲永久中文字幕在线| 超pen个人视频国产免费观看| 色一情一乱一伦一视频免费看| 久久久久亚洲精品无码网址 | 亚洲AV无码码潮喷在线观看| 中文字幕在线免费观看| 一本色道久久88—综合亚洲精品| 国产免费观看青青草原网站| 中国一级特黄的片子免费| 蜜芽亚洲av无码精品色午夜| 一个人免费高清在线观看 | 亚洲成无码人在线观看| 在线免费观看一级毛片| h片在线观看免费| 亚洲欧洲日本国产| 亚洲&#228;v永久无码精品天堂久久| 香蕉免费看一区二区三区| 亚洲毛片免费观看| 亚洲色偷偷狠狠综合网| 成人午夜免费福利视频|