打印预览?然后调整宽度大小?

解决方案 »

  1.   

    <html><head>
    <meta http-equiv="Content-Language" content="zh-cn">
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <style>
    @media print {
    .noprint
    {
    display:none;
    }
    .yesprint
    {
    display=yes;
    }
    }</style>
    </head><body>
    <input type=button class=noprint value="打印Table1" onclick="table1.className='yesprint';print();table1.className='noprint'"><input type=button class=noprint value="打印Table2" onclick="table2.className='yesprint';print();table2.className='noprint'"><input type=button class=noprint value="打印Table3" onclick="table3.className='yesprint';print();table3.className='noprint'">  <table id=table1 class=noprint border="1" width="112" height="72">
        <tr>
          <td width="112" height="26">Table1</td>
        </tr>
      </table>
      <table id=table2 class=noprint border="1" width="112" height="72">
        <tr>
          <td width="112" height="26">Table2</td>
        </tr>
      </table>
      <table id=table3 class=noprint border="1" width="112" height="72">
        <tr>
          <td width="112" height="26">Table3</td>
        </tr>
      </table></body></html>