打印

15 篇文章 0 订阅
4 篇文章 0 订阅
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <style type="text/css">
.dropdown-panel {position:absolute; color:Black; filter:shadow(color=#000000, direction=125, strength=3); padding-bottom:5px; white-space:nowrap; }
.dropdown-panel-header {border:1px solid Gray; border-bottom:none; background-color:White; float:left; padding:3px 5px; position:relative; z-index:1; line-height:100%; font-size:14px;}
.dropdown-panel-body {border:1px solid Gray; background-color:White; float:left; clear:left; padding:3px; line-height:150%; margin:-1px 5px 5px 0px;}
.list1 {list-style-type:decimal; margin:0 0 0 25px;}
@media screen
{
.infobg {background:#EFEFEF; padding:5px; font-size:12px; line-height:150%;}
.infotitle {padding:5px; text-align:center; color:White; background:url(images/tableHeadBg_blue.gif) repeat-x #539cb8;}
.infohead {background-color:#0033FF;color:White;}
}
@media print
{
.notPrint {display:none; height:0px;}
.infobg {font-size:12px; line-height:100%;}
.infotitle {text-align:center; }
}
</style>
    <script type="text/javascript">


        $(document).ready(function () {
            $('.lnkPrint').mouseover(lnkPrint_mouseover);
            var pnl = $('#pnlPrint');
            pnl.mouseover(function () { pnl.show(); });
            pnl.mouseout(function () { pnl.hide(); });
            $().click(function () {
                pnl.hide();
            });
        });
        function lnkPrint_mouseover(e) {
            var pos = $(e.srcElement).position();
            $('#pnlPrintHead').html(e.srcElement.innerText);
            $('#pnlPrintBody').html($('#' + e.srcElement._targetControlID).html());
            var pnl = $('#pnlPrint');
            pnl.css('left', pos.left - 6);
            pnl.css('top', pos.top - 4);
            pnl.slideDown();
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    
       <%-- <asp:Button ID="BtnPrint" runat="server" Text="打印" οnclick="BtnPrint_Click" />--%>
    <div class="notPrint" style="text-align:center;">
<input type="button" value="点此打印" style="width:132px; height:32px; background:url(Images/button_highlight.gif) blue; color:White; font-size:14px; border:0; font-weight:bold;" οnclick="window.print();">
</div>
<%----%>


<div id="pnlPrint" class="dropdown-panel" style="display:none;">
<div id="pnlPrintHead" class="dropdown-panel-header"></div>
<div id="pnlPrintBody" class="dropdown-panel-body"></div>
</div>

<table width="649" cellspacing="0" cellpadding="0" border="0" align="center">
<tr>
<td>
我打印了哦
</td>
</tr>

</table>
<div>
我打印了哦
</div>

<div class="notPrint" style="text-align:center;">
我不打印
</div>


    </div>
    </form>
</body>
</html>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值