echo "<script>document.write(\"<a href='javascript:window.open(\\\"url\\\",\\\"\\\",\\\"scrollbars=yes,width=600,height=400\\\");\'>".$result[state]."</a>\");</script>";

解决方案 »

  1.   

    点击了以后。。出现[object]。。为什么呀?
      

  2.   

    加入了win.focus()后,[object]没有了。。不过IE提示win未定义。。而且GIF动画都不动了。。
      

  3.   

    echo "<script>document.write(\"<a href=# onclick='javascript:window.open(\\\"url\\\",\\\"\\\",\\\"scrollbars=yes,width=600,height=400\\\");\'>gfds</a>\");</script>";
      

  4.   

    这样才对:
    echo "document.write('<a href=\"#\" onclick=window.open(\'url\',\'\',\'scrollbars=yes,width=600,height=400\')>$result[state]</a>');" ;
    你写掉了触发事件和一个“>”,已经单引号配对有问题。。