<script>
if(confirm('是否')){
alert(1);
}
  </script>

解决方案 »

  1.   

    系统自带的  confirm()
      

  2.   


    <a href="###" onclick="if(confirm('是否删除?')) alert('执行删除操作')">删除</a>
      

  3.   

    <html xmlns="http://www.w3.org/1999/xhtml" >
    <head id="Head1" runat="server">
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
            <input id="Button1" type="button" value="button" onclick="del()" /></div>
        </form>
    </body>
    </html>
    <script>
    function del()
    {
        if(confirm("是否删除?")){
        alert("删除");
        }else{
        alert("不删除");
        }
    }
    </script>