javascript 【2018.11.30】

<html>
<head>
  <title></title>
  <script type="text/javascript">
     function show_confirm()
     {
        var r = confirm("Please hoose OK or Cancel");
        if(r == true)
        {
           alert("you hvae click OK");
        }
        else
        {
           alert("you hvae click Cancel")
        }
     }
  </script>
</head>
<body>
   <input type="button" onclick="show_confirm()" value="show a confirm box"/>
</body>
</html>

猜你喜欢

转载自blog.csdn.net/weixin_30589127/article/details/84669383