<script>
function showDialog(){
  var arr = showModalDialog("dialog.html", "", "dialogWidth:15.5em; dialogHeight:5.5em; status:0");
  if (arr != null && arr)
window.open("show.html");
  else
window.open("other.html");
}
</script>
<BODY BGCOLOR="#FFFFFF">
<input type="button" value="show" onclick="showDialog();">
</BODY>dialog.html
<script>
function ret(para){
window.returnValue =para ;
window.close();
}
</script>
<BODY BGCOLOR="#FFFFFF">
<table align="center"><tr><td>
<input type="button" name="b1" value="《是》" onclick="ret(true)">
<td>
<input type="button" name="b2" value="《否》" onclick="ret(false)">
</table>
</BODY>

解决方案 »

  1.   

    <script>
    if(confirm("到我这里看看好吗???"))
    window.open("http://colorweb.go.163.com")
    else
    window.open("http://luvky.myrice.com")
    </script>
      

  2.   

    confirm()是确定和取消啊。
    有没有办法将确定和取消改为“否”和“是”呢?
      

  3.   

    <script language=vbs>
    msgbox "a",4
    </script>
      

  4.   

    <script>
    execScript('ret=msgbox("Yes or no?",4)','vbscript')
    if(ret==6)
    window.open("http://colorweb.go.163.com")
    else
    window.open("http://luvky.myrice.com")
    </script>