what r u talking about..can u give a sample?

解决方案 »

  1.   


    <SCRIPT LANGUAGE="JavaScript">
    function f(e)
    {
    var img = document.getElementById("fst");
    if(img)
    {
    e=e||window.event;
    img.style.left=e.clientX+document.body.scrollLeft-img.width/2+"px";
    img.style.top=e.clientY+document.body.scrollTop-img.height/2+"px";
    }
    }
    function cd(obj)
    {
    window.open('a.html','_blank');
    obj.parentNode.removeChild(obj);
    }</SCRIPT>
    <body onmousemove="f(event)" onscroll="f(event)">
    <div style="height:1000px;border:1px solid black">
    <a href="b.html">本站链接</a>
    </div>
    <img src="img.jpg" id="fst" width="20" height="20" onclick="cd(this)" style="position:absolute;z-index:99">
    </body>只是个例子 自己设置图片透明吧
      

  2.   

    我晕!neo_yoho 我太爱你了!你今年一定发大财,结婚没?没结婚一定娶个好老婆!有孩子没?没孩子一定生个天才出来!爱死你了!
      

  3.   

    看来楼主新年过很HAPPY吧!
    嘴这么甜,收了不少红包吧。
    :-D
      

  4.   

    那个还不兼容,下面这个才兼容
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
    <title>无标题文档</title>
    <SCRIPT LANGUAGE="JavaScript">
    function f(e)
    {
        var img = document.getElementById("fst");
        if(img)
        {
            e=e||window.event;
            img.style.left=e.clientX+document.documentElement.scrollLeft-img.width/2+"px";
            img.style.top=e.clientY+document.documentElement.scrollTop-img.height/2+"px";
        }
    }
    function cd(obj)
    {
        window.open('a.html','_blank');
        obj.parentNode.removeChild(obj);
    }</SCRIPT>
    </head>
    <body onmousemove="f(event)" onscroll="f(event)">
    <div style="height:1000px;border:1px solid black">
    <a href="b.html">本站链接</a>
    </div>
    <img src="img.jpg" id="fst" width="20" height="20" onclick="cd(this)" style="position:absolute;z-index:99">
    </body>
    </html>