当前位置:首页
开发技术指南» 文章正文
    引言:
 

 

    摘要: 我现在要写一个unix下用c写的服务器端socket的例子 可惜我没有写过,请高手指点一下,最好用一个简明的例子 行吗 ......
 ·有关图像拷贝    »显示摘要«
    摘要: 如何获取系统当前剪切板中内容?或如何获取其地址(指针)?有没有参考资料? ......


网页打印有什么好的打印方法

就是打印时,打印效果会随纸张的大小变化

NO.1   作者: tigerwen01

 
  在<head></head>之间加入如下代码;  
  <OBJECT   Classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2   height=0   id=WB   width=0></OBJECT>  
  <script   language=javascript>  
  function   doPrintSetup(){  
  WB.ExecWB(8,1)  
  }  
  function   doPrintPreview(){  
  WB.ExecWB(7,1)  
  }  
  </script>  
   
  在<body>中调用:  
  <input   type=button   name=button1   value="打印设置"   onclick="return   doPrintSetup()">  
  <input   type=button   name=button2   value="打印预览"   onclick="return   doPrintPreview()">  
  <input   type=button   name=button3   value="打印本页"   onclick="javascript:print()">

NO.2   作者: denghan

--------打印控制------------------------------------  
  <head>  
  <title>打印确认</title>  
  <style   media="print">  
  .noprint   {   display:   none   }  
  </style>  
  </head>  
  <body>  
  <object   id="factory"   style="display:none"   viewastext   classid="clsid:1663ed61-23eb-11d2-b92f-008048fdd814"   codebase="http://www.meadroid.com/scriptx/ScriptX.cab#Version=5,60,0,360"></object>  
  <script   defer>  
  function   window.onload()   {  
      factory.printing.header   =   "自定义页头"  
      factory.printing.footer   =   "数码在线"  
      factory.printing.portrait   =   false  
      idPrint1.disabled   =   false;   //   enable   UI   button  
      idPrint2.disabled   =   false;  
      idPrint3.disabled   =   false;  
      idPrint4.disabled   =   false;  
      factory.printing.leftMargin   =   0.75  
      factory.printing.topMargin   =   1.5  
      factory.printing.rightMargin   =   0.75  
      factory.printing.bottomMargin   =   1.5  
      }  
  </script>  
  <div   class=noprint>  
      <input   id="idPrint1"   type="button"   value="打印本页"  
    onclick="factory.printing.Print(false)">  
      <input   id="idPrint2"   type="button"   value="页面设置"  
    onclick="factory.printing.PageSetup()">  
      <input   id="idPrint3"   type="button"   value="打印预览"  
    onclick="factory.printing.Preview()">  
      <input   id="idPrint4"   type="button"  
    onclick="window.close()"   value="关闭窗口">  
  </div>  
  <br>  
  <table   width="720"   border="0"   cellspacing="0"   cellpadding="0"   align="center"   >  
      <tr>    
          <td   width="2"     bgcolor="#0099ff">  
        这里是你要打印的内容,上面的按钮不会被打印出来<br>  
        如果你有什么内容不想打印,用将其样式定义为noprint即可          
        </td>  
  </tr></table></body>


 ·怎么得到系统时间    »显示摘要«
    摘要: 我想测试一个程序的执行时间,要毫秒级的,请问一下该怎么作。 ......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE