最简单的方法:在制作flash时把链接加到里面

解决方案 »

  1.   

    swfFloating.onclick = function(){
        location.href="http://www.csdn.net";
    }
    或更改s字符串var s = '<DIV ID="swfFloating" STYLE="cursor:hand;position:absolute;z-index:1000;margin:0px;padding:0px;left:0px;top:0px;width:'+swfWidth+'px;height:'+swfHeight+'px;" onclick='location.href=\"http://www.csdn.net\"'>
      

  2.   

    不行~~第一种没有用,第二种报错说在onclick附近的地方缺少;
      

  3.   

    没注意你是单引号的字符串,这回应该可以了
    var s = '<DIV ID="swfFloating" STYLE="cursor:hand;position:absolute;z-index:1000;margin:0px;padding:0px;left:0px;top:0px;width:'+swfWidth+'px;height:'+swfHeight+'px;" onclick="location.href=\"http://www.csdn.net\"">