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

    摘要: 我要统计一个表中sex字段男女的数目在sql中可以用select sum(id) from table1 where sex=男,但是这个sun(id)怎么才能出来呢?它只是在sql中啊,在delphi中我是不是只能多次打开adoquery添加sql语句来取得我要的数据? ......
 ·诡异问题之三    »显示摘要«
    摘要: 在程序中某段代码中,有:if(***)messagebox("here is the root of the tree","",mb_ok); 竟然报告说:messageboxa : function does not take 3 parameters 明显是睁眼说瞎话嘛. 你认为这是怎么回事呢? ......


以这种样式来做

 
  ---------------------             >(按钮)                     -----------------           move   up(button)  
  |checkbox     1                                                                   这边表格有初值  
  |--------------------                                                                                           move   down      
  |checkbox     2                               <(按钮)  
  |  
  |  
  |----------  
   
   
  这么画的能看懂吗?

NO.1   作者: bguest

<html>  
   
  <head>  
  <meta   http-equiv="Content-Type"   content="text/html;   charset=UTF-8">  
  <title>Page   Selection</title>  
  <style>  
  td{white-space:nowrap};  
  body{margin-left:0;margin-right:0;margin-top=0;margin-bottom=0};  
  </style>  
  </head>  
   
  <body   bgcolor=eeeeee>  
   
   
   
  <table>  
  <tr   >    
  <td>    
  <select   name=SrcSelect   size=6   style="font-size:11pt;width=200;height=160px"   multiple   >    
  <option   value="1">test1</option>    
  <option   value="2">test2</option>    
  <option   value="3">test3</option>    
  <option   value="4">test4</option>    
  <option   value="5">test5</option>    
  <option   value="6">test6</option>    
  </select>  
  </td>    
  <td   align="center">          
  <input   align="left"   type=button   value="→"     onclick="moveLeftOrRight(document.all.SrcSelect,document.all.ObjSelect)"     ><br><br>  
  <input   align="left"   type=button   value="←"     onclick="moveLeftOrRight(document.all.ObjSelect,document.all.SrcSelect)"     >  
  </td>  
  <td>    
  <select   name=ObjSelect   size=6   style="font-size:11pt;width=200;height=160px"   multiple   >    
  <option   value="11">test11</option>    
  <option   value="12">test12</option>    
  <option   value="13">test13</option>    
  <option   value="14">test14</option>    
  <option   value="15">test15</option>    
  <option   value="16">test16</option>    
  </select>  
  </td>    
  <td>  
  <input   type=button   value="↑"     onclick="moveUp()"   ><br><br>  
  <input   type=button   value="↓"     onclick="moveDown()"   >  
  </td>  
  </tr>    
  </table>  
  </body>      
       
  <script   language=javascript>      
  function   moveUp()      
  {    
  var   theObj=document.all.ObjSelect;  
  for(var   i=1;i<theObj.length;i++)  
  {  
  if(   theObj.options[i].selected   &&   !theObj.options[i-1].selected   )  
  {  
  var   tempOption=new   Option(theObj.options[i-1].text,theObj.options[i-1].value);  
  theObj.options[i-1].removeNode(true);  
  theObj.add(tempOption,i);  
  }  
  }  
  }      
       
  function   moveDown()      
  {    
  var   theObj=document.all.ObjSelect;  
  for(var   i=theObj.length-2;i>-1;i--)  
  {  
  if(   theObj.options[i].selected   &&   !theObj.options[i+1].selected   )  
  {  
  var   tempOption=new   Option(theObj.options[i].text,theObj.options[i].value);  
  theObj.options[i].removeNode(true);  
  theObj.add(tempOption,i+1);  
  theObj.options[i+1].selected=true;  
  }  
  }  
  }      
       
       
  function   moveLeftOrRight(fromObj,toObj)      
  {      
  var   lengthOfToObj=toObj.length;  
  for(var   i=fromObj.length-1;i>-1;i--)  
  {  
  if(fromObj.options[i].selected)  
  {  
  toObj.add(new   Option(fromObj.options[i].text,fromObj.options[i].value),lengthOfToObj);  
  toObj.options[lengthOfToObj].selected=true;  
  fromObj.options[i].removeNode(true);  
  }  
  }  
  }      
       
       
     
  </script>      
 

NO.2   作者: precipitant

简单。

NO.3   作者: gaochao79

51job里面有这些东东的应用,偷来就是了


 ·路由器互连问题,    »显示摘要«
    摘要: 两个路由器下面都接了四台机器,两个路由器都拨号上网,但是两个路由器离的很远,请问能不能实现两个路由器下面的机子互相访问,该怎么实现呢? ......
» 本期热门文章:

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