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

 

    摘要: http://www.4856.com/down/show.php?id=198&down=1 当单击这个连接后,就会弹出下载文件的对话框, 1,请问在?号后面的id与down两个变量的作用是什么?? 2,这两个变量是发送到那里了?! 3,发送这两个变量的是不是show.php文件??如果是,他具体是怎么做的?! 4,接第3问,如果不是,那是谁发送的? 又是如何发送的?! 5,有关......
 ·关于isam的问题    »显示摘要«
    摘要: 我用vb6,dao+access 写的程序,在退出一个窗口时先检查数据库中的某个表有否改变,有改变则将该表通过sql语句导出到一个txt文件中,在编程的机器上运行是没问题的,编译打包后安装运行也是没问题(包括同一台机上的win2k下也ok,(我是双启动)),但在别的机上安装后(win98),每当运行到需要导出到txt文件时,程序就会报错:“错误号3170,未能插入到isam",这......


有没有办法让鼠标拉着层动就象拉平常的窗口一样。

我的意思是要用鼠标单击层,然后可以拉着层改变位置。  
  有没有办法?

NO.1   作者: cutesun

以下代码加入<body>区域   就可以了  
   
  <script   language="javascript">  
  var   IE5=(document.getElementById   &&   document.all)?   true   :   false;  
  var   W3C=(document.getElementById)?   true:   false;  
  var   currIDb=null,   currIDs=null,   xoff=0,   yoff=0;   zctr=0;   totz=0;  
  function   trackmouse(evt){  
  if((currIDb!=null)   &&   (currIDs!=null)){  
  var   x=(IE5)?   event.clientX+document.body.scrollLeft   :   evt.pageX;  
  var   y=(IE5)?   event.clientY+document.body.scroll   :   evt.pageY;  
  currIDb.style.left=x+xoff+px;  
  currIDs.style.left=x+xoff+10+px;  
  currIDb.style.top=y+yoff+px;  
  currIDs.style.top=y+yoff+10+px;  
  return   false;  
  }}  
   
  function   stopdrag(){  
  currIDb=null;  
  currIDs=null;  
  NS6bugfix();  
  }  
   
  function   grab_id(evt){  
  xoff=parseInt(this.IDb.style.left)-((IE5)?   event.clientX+document.body.scrollLeft   :   evt.pageX);  
  yoff=parseInt(this.IDb.style.top)-((IE5)?   event.clientY+document.body.scroll   :   evt.pageY);  
  currIDb=this.IDb;  
  currIDs=this.IDs;  
  }  
   
  function   NS6bugfix(){  
  if(!IE5){  
  self.resizeBy(0,1);  
  self.resizeBy(0,-1);  
  }}  
   
  function   incrzindex(){  
  zctr=zctr+2;  
  this.subb.style.zIndex=zctr;  
  this.subs.style.zIndex=zctr-1;  
  }  
   
  function   createPopup(id,   title,   width,   height,   x   ,   y   ,   isdraggable,   boxcolor,   barcolor,   shadowcolor,   text,   textcolor,   textptsize,   textfamily   ){  
  if(W3C){  
  zctr+=2;  
  totz=zctr;  
  var   txt=;  
  txt+=<div   id="+id+_s"   style="position:absolute;   left:+(x+10)+px;   top:+(y+10)+px;   width:+width+px;   height:+height+px;   background-color:+shadowcolor+;   filter:alpha(opacity=50);   visibility:visible">   </div>;  
  txt+=<div   id="+id+_b"   style="border:outset   +barcolor+   2px;   position:absolute;   left:+x+px;   top:+y+px;   width:+width+px;   overflow:hidden;   height:+height+px;   background-color:+boxcolor+;   visibility:visible">;  
  txt+=<div   style="width:+width+px;   height:16px;   background-color:+barcolor+;   padding:0px;   border:0px;"><table   cellpadding="0"   cellspacing="0"   border="0"   width="+(IE5?   width-4   :   width)+"><tr><td   width="+(width-20)+"><div   id="+id+_h"   style="width:+(width-20)+px;   height:14px;   font:   bold   12px   sans-serif;   color:+textcolor+">   +title+</div></td><td   align="right"><a   onmousedown="document.getElementById(\+id+_s\).style.display=\none\;   document.getElementById(\+id+_b\).style.display=\none\;return   false"><img   src="close.gif"   border="0"   height="11"   width="11"></a></td></tr></table></div>;  
  txt+=<div   id="+id+_ov"   width:+width+px;   style="margin:2px;   color:+textcolor+;   font:+textptsize+pt   +textfamily+;">+text+</div></div>;  
  document.write(txt);  
  this.IDh=document.getElementById(id+_h);  
  this.IDh.IDb=document.getElementById(id+_b);  
  this.IDh.IDs=document.getElementById(id+_s);  
  this.IDh.IDb.subs=this.IDh.IDs;  
  this.IDh.IDb.subb=this.IDh.IDb;  
  this.IDh.IDb.IDov=document.getElementById(id+_ov);  
  if(IE5){  
  this.IDh.IDb.IDov.style.width=width-6;  
  this.IDh.IDb.IDov.style.height=height-22;  
  this.IDh.IDb.IDov.style.scrollbarBaseColor=boxcolor;  
  this.IDh.IDb.IDov.style.overflow="auto";  
  }else{  
  this.IDh.IDs.style.MozOpacity=.5;  
  }  
  this.IDh.IDb.onmousedown=incrzindex;  
  if(isdraggable){  
  this.IDh.onmousedown=grab_id;  
  this.IDh.onmouseup=stopdrag;  
  }}}  
   
  if(W3C)document.onmousemove=trackmouse;  
  if(!IE5   &&   W3C)window.onload=NS6bugfix;  
  createPopup(   box3,   .:小雨在线:.   ,   300,   150,   50,   155,   true,   de9ede   ,   000000   ,   840000   ,   欢迎来小雨在线   ,   FFFFFF   ,   9   ,   arial);  
  </script>

NO.2   作者: longxiaojie

有办法,你可以看看  
  http://www.51windows.com/  
  用js做,呵呵,比较不错

NO.3   作者: gxdx

Dreamwaver给你大把垃圾代码。  
  用我的吧:  
  层的拖动              
   
  <script>  
  //SZUDragDiv类的定义  
   
  function   SZUDragDiv()  
  {  
  this.DragObj=null  
  this.Moving=false;  
  this.OffSetX=0  
  this.OffSetY=0  
  this.OldDocOnMove=document.onmousemove;  
   
  this.Grab=SZUDragDiv_Grab;  
  this.Move=SZUDragDiv_Move;  
  this.Drop=SZUDragDiv_Drop;  
  }  
   
  function   SZUDragDiv_Grab(obj)  
  {  
        this.DragObj=obj  
        this.OffSetX=event.x-this.DragObj.style.pixelLeft  
        this.OffSetY=event.y-this.DragObj.style.pixel  
        this.Moving=true  
        document.onmousemove=this.Move  
  }  
     
    function   SZUDragDiv_Move()  
    {  
        if(this.Moving==true)  
        {  
          this.OldDocOnMove  
  this.DragObj.style.pixelLeft=event.x-this.OffSetX  
  this.DragObj.style.pixel=event.y-this.OffSetY  
        }  
    }  
     
    function   SZUDragDiv_Drop()  
    {  
        this.DragObj=null  
        this.Moving=false  
        document.onmousemove=this.OldDocOnMove  
    }  
       
    </script>  
  <script>  
  var   myDrag=new   SZUDragDiv();     //生成一个SZUDragDiv对象  
  </script>  
   
   
  在页面里  
  <div   id=yourdiv   style="position:absolute;"   onmousedown="myDrag.Grab(this)"   onmousemove="myDrag.Move()"   onmouseup="myDrag.Drop()">  
  hello</div>


 ·关于输入10进制转成2进制    »显示摘要«
    摘要: 这是一个子程序,是键盘输入10进制变成二进制的 decibin proc near mov bx,0 newchar: mov ah,1 ;比如输入的是9 int 21h sub al,30h jl exit cmp al,9d jg exit cbw ;执行到这步ax=0009? xchg ax,bx ; ax=0000,bx=0009 mov cx,10d......
» 本期热门文章:

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