<script type="text/javascript">
function ajaxupdate()
{
alert("http://www.sina.com"); 
}
</script>
<input type=button onclick="ajaxupdate()"> 希望显示的对话框中 会有一个  url,点击该url后进入相应网址,alert似乎不支持url,什么对话框可以支持url 呢?怎么写呢?

解决方案 »

  1.   

    alert应该不能完成这个功能吧~~关注一下
      

  2.   

    <html>
    <head>
    <script type="text/javascript">
    function show_confirm()
    {
    var r=confirm("http://sina.com.cn");
    if (r==true)
      {
        location.href = "http://sina.com.cn";
       }
    else
      {
        return;
      }
    }
    </script>
    </head>
    <body><input type="button" onclick="ajaxupdate()" value="" /></body>
    </html>
      

  3.   

    可以用showModalDialog重写一下alert,在弹出的新的页面中就可以实现你想要的效果了
      

  4.   

    Lz这思路搞错了。不是用alert,是去弹个层出来就是了