<body onload="window.print()">

解决方案 »

  1.   


    <style>
    @media print {
       .ptn {display:block;}   
       .notptn {display:none;}
    }
    </style>
    <div class="notptn"> 不打印</div><div class="ptn"> 打印</div><A href="javascript:doprint()">【打印该页】</A>放到一个页面打印预览看一下。。
    你重要在aspx页面将你的打印按钮 的CssClass="notptn"即可
      

  2.   

    <script language="javascript">
    <!--
    function myprint(f) {
    f.style.visibility = 'hidden';
    document.all.item("btnClose").style.display="none";
    //document.Form1.btnClose.display="none";
    //document.Form1.btnClose.visibility = 'hidden';
    document.all.WebBrowser.ExecWB(7,1);
    f.style.visibility = 'visible';
    window.opener = null;
    window.close();
    this.visible = false;
    return true;
    }
    function myclose(){
    window.opener = null;
    window.close();
    return true;
    }
    // -->
    </script>
    <INPUT id="btnPrint" style="BORDER-TOP-STYLE: none; BORDER-RIGHT-STYLE: none; BORDER-LEFT-STYLE: none; BACKGROUND-COLOR: transparent; TEXT-DECORATION: underline; BORDER-BOTTOM-STYLE: none" onclick=" return myprint(this);" type="button" value="打 印">
      

  3.   

    net_lover(孟子E章)  你说的那个要写在哪里?能具体一点吗???我的意思是把画图的这部分功能直接画到打印机上,请问方法可行吗???
     chenee543216(奋斗成就男人!)  你的方法是打印一页???我的意思是把画图的这部分功能直接画到打印机上
      

  4.   

    <html>
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312"></head>
    <body bgcolor="#FFFFFF" text="#000000" >
    <table width="91%" border="1" cellspacing="0" cellpadding="0">
      <tr> 
        <td width="23%"><b><font size="5">dffgdfg</font></b></td>
        <td width="25%"><b><font size="5">dfgdfg</font></b></td>
        <td width="26%"><b><font size="5">dfgdf</font></b></td>
        <td width="26%"><b><font size="5">dddddddddd</font></b></td>
      </tr>
    </table>
    <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(7,1)">
    <input type="button" name="Button1" value="打印" onClick="javascript:window.print()">
    </body>
    这个应该是可以打印出整个aspx页面吧·!!如何把我画图的这部分功能直接画到打印机上