take a look at
Windowless Frames using Z-Index
http://msdn.microsoft.com/workshop/samples/author/dhtml/refs/winless.htm

解决方案 »

  1.   

    是不是这样的
    <html>
    <head>
    </head>
    <body bgcolor="#FFFFFF" text="#000000">
    <style>
    <!--.drag{position:relative;cursor:hand}
    -->
    </style>
    <script language="JavaScript">
    var dragapproved=false
    var z,x,y
    function move(){
    if (event.button==1&&dragapproved){
    z.style.pixelLeft=temp1+event.clientX-x
    z.style.pixelTop=temp2+event.clientY-y
    return false
    }}
    function drags(){
    if (!document.all)
    return
    if (event.srcElement.className=="drag"){
    dragapproved=true
    z=event.srcElement
    temp1=z.style.pixelLeft
    temp2=z.style.pixelTop 
    x=event.clientX
    y=event.clientY
    document.onmousemove=move
    }}
    document.onmousedown=drags
    document.onmouseup=new Function("dragapproved=false")
    </script>
            <img src="你的文件" class="drag"   onclick="你的事件">
    </body>
    </html>
      

  2.   


    <html>
    <head>
    </head>
    <body bgcolor="#FFFFFF" text="#000000">
    <style>
    <!--.drag{position:relative;cursor:hand}
    -->
    </style>
    <script language="JavaScript">
    var dragapproved=false
    var z,x,y
    function move(){
    if (event.button==1&&dragapproved){
    z.style.pixelLeft=temp1+event.clientX-x
    z.style.pixelTop=temp2+event.clientY-y
    return false
    }}
    function drags(){
    if (!document.all)
    return
    if (event.srcElement.className=="drag"){
    dragapproved=true
    z=event.srcElement
    temp1=z.style.pixelLeft
    temp2=z.style.pixelTop 
    x=event.clientX
    y=event.clientY
    document.onmousemove=move
    }}
    document.onmousedown=drags
    document.onmouseup=new Function("dragapproved=false")
    </script>
    <script Language="JavaScript">
        function  ss(){
        alert("是这样的吗?")
        }
    </script>
            <img src="你的文件" class="drag"   onclick="ss()">
    </body>
    </html>
      

  3.   

    <html>
    <title>拖动移动层.html</title>
    <script language=javascript></script>
    <body><style>
    .drag{position:relative;cursor:hand}
    </style>
    <script language="JavaScript">
    var dragapproved=false
    var eventsource,x,y
    function move()
     {
      if (event.button==1&&dragapproved) //改变被拖动元素在页面上的位置
       {
        eventsource.style.pixelLeft=temp1+event.clientX-x
        eventsource.style.pixelTop=temp2+event.clientY-y
        return false
       }
     }
    function drags()
     {
      if (!document.all)
      return
      if (event.srcElement.className=="drag") //捕捉鼠标和被拖动元素的当前位置
       {
        dragapproved=true
        eventsource=event.srcElement
        temp1=eventsource.style.pixelLeft
        temp2=eventsource.style.pixelTop
        x=event.clientX
        y=event.clientY
        document.onmousemove=move
       }
     }
    document.onmousedown=drags   //鼠标左键按下时,准备拖动
    document.onmouseup=new Function("dragapproved=false")//鼠标左键放开时,拖动停止
    </script>
    <span style="font-family:DextorOutD;font-size: 9pt">
    <div id=mydiv class=drag style="background:red;width:50%">
    <p>drag it!</p>
    <p align=center>text<p>
    <p>ha ha!</p>
    </div>
    </span></body>
    </html>