JavaScript點擊按鈕顯示 確認對話框


//JavaScript點擊按鈕顯示確認對話框
<html xmlns="http://www.w3.org/1999/xhtml">  
<head>  
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />  
<title>My First Script</title>  
<script type="text/javascript">  
function test() {  
    var result = confirm("Please make sure.");  
    if (result == true) {  
        alert("You choose YES! Great!");  
    } else {  
        alert("What a bitch you are !");  
    }  
}  
</script>  
</head>  
<body>  
    <input type="button" value="Click Me!" onClick="test();" />  
</body>  
</html>  


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM