这个问题不麻烦吧? 怎么没人回答呢?

解决方案 »

  1.   

    不是麻不麻烦的事。而是你说的不够明白。
      

  2.   

    我是用javascirpt写的
    <script>
    var xPos = 20;
    var yPos = document.body.clientHeight;
    var step = 1;
    var delay = 30;
    var height = 0;
    var Hoffset = 0;
    var Woffset = 0;
    var yon = 0;
    var xon = 0;
    var pause = true;
    var interval;
    img.style.top = yPos;
    function changePos() {
    width = document.body.clientWidth;
    height = document.body.clientHeight;
    Hoffset = img.offsetHeight;
    Woffset = img.offsetWidth;
    img.style.left = xPos + document.body.scrollLeft;
    img.style.top = yPos + document.body.scrollTop;
    if (yon) {
    yPos = yPos + step;
    }
    else {
    yPos = yPos - step;
    }
    if (yPos < 0) {
    yon = 1;
    yPos = 0;
    }
    if (yPos >= (height - Hoffset)) {
    yon = 0;
    yPos = (height - Hoffset);
    }
    if (xon) {
    xPos = xPos + step;
    }
    else {
    xPos = xPos - step;
    }
    if (xPos < 0) {
    xon = 1;
    xPos = 0;
    }
    if (xPos >= (width - Woffset)) {
    xon = 0;
    xPos = (width - Woffset);
    }
    }
    function startit() {
    img.visibility = "visible";
    interval = setInterval('changePos()', delay);
    }function stopit() {
    clearInterval(interval);
    }
    startit();
    </script>  <div id="img" style="position: absolute; left: 0; top: 1652; width: 137; height: 106">
      <div id="leftup" style="position:relative; z-index:1; width: 80; height: 60">
        <img src="images/piao1.gif"
      border=0 width="100" height="100"></div></div>
    我是判断在不同情况下让这幅图片漂浮出来,现在允许它漂浮的时候一切正常,可不允许它出来的时候就报错,错误为:出现运行期错误,错误img未定义。还请各位帮忙!
      

  3.   

    居然没人帮我, 无奈!!