a=window.confirm("是否??")
if(a==true)
   {location.href="1.html"}
else
   {location.href="2.html"}

解决方案 »

  1.   

    Dim haha
    haha = msgbox ("问你呢!",4,"标题")
    If haha = vbYes Then Location.href="http://www.yes.com"
    If haha = vbNo Then Document.Write "http://www.no.com"
      

  2.   

    第一部分要素:
    var rt=window.showModalDialog("myMsg.htm","","center:yes");
    if (rt=="YES") window.open("yes.htm","_self");
    else if (rt=="NO") window.open("no.htm","_self");第二部分要素:(yes.htm的部分内容)
    window.returnValue="NO";
    function onYesClick(){window.returnValue="YES";window.close();}
    function onNoClick(){window.close();}
      

  3.   

    更正一下,上面的第二部分是myMsg.htm的部分内容,不是yes.htm的.
    呵呵,不好意思,太粗心了