JS

怎么用JS弹出一个含我 “是”,“否”,“取消”,按钮的消息框、

解决方案 »

  1.   

    自己实现吧,js本身不自带,只能自己写一个弹出消息框或者用一些现有的框架实现,如:jquery UI,ymPrompt 等
      

  2.   

    confirm("确定?");
    可以自己用div模拟.
      

  3.   

    js自带这的return confirm("确定?").如果要实现你说的那功能自己写吧,可以弹出一个iframe挡住整个页面。
      

  4.   

    Ext的window的那套样式 LZ可以在firebug下扒下来瞅瞅
      

  5.   

    建议直接使用ext。都封装好了,学会了很方便。
      

  6.   


    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head>
    <title></title>
    <script type="text/javascript">
    function show(){var div1 = document.createElement("div");
    div1.style.cssText = "position:absolute;width:200px;height:100px;background-color:#ddeeff";
    var btn1 = document.createElement("input");
    btn1.style.cssText = "margin-left:30px;margin-top:30px;";
    btn1.type = "button";
    btn1.value = "是";
    btn1.onclick = function(){
    alert("是");
    document.body.removeChild(div1);
    }
    var btn2 = document.createElement("input");
    btn2.style.cssText = "margin-left:30px;margin-top:30px;";
    btn2.type = "button";
    btn2.value = "否";
    btn2.onclick = function(){
    alert("否");
    document.body.removeChild(div1);

    var btn3 = document.createElement("input");
    btn3.style.cssText = "margin-left:30px;margin-top:30px;";
    btn3.type = "button";
    btn3.value = "取消";
    btn3.onclick = function(){
    document.body.removeChild(div1);
    }div1.appendChild(btn1);
    div1.appendChild(btn2);
    div1.appendChild(btn3);
    document.body.appendChild(div1);
    }
    </script>
    </head>
    <body>
    <input type="button" value="出来" onclick="show();"/>
    </body>
    </html>
      

  7.   

    ext做内网很不错,外网的话就算了,还是js好