WHAT'S NEW?
Loading...

Javascript Konfirmasi


Tutorial Details
  • Judul: javascript konfirmasi
  • Difficulty: Beginner
  • Platform: -
  • Bahasa Scripth: Javascript
  • Software : -
  • Estimated Completion Time: 15 minutes
  • Created:Ricko Nada (Pustaka Flash)





live demo :


Scripth yang digunakan :
<script type="text/javascript">
function runCheck() {
    var c = confirm("Are you sure you want to do that?");
    var status = document.getElementById("status");
    if (c == true){
        status.innerHTML = "You confirmed, thanks";
    } else {
        status.innerHTML = "You cancelled the action";
    }
}
</script>
<input type="button" value="Perform Action" onclick="runCheck()">
<h2 id="status"></h2>



0 komentar:

Post a Comment