Selasa, 10 April 2012

Javascript Confirm

<html>
<head>
<script type="text/javascript">
<!--
function confirmation() {
    var answer = confirm("Ingin meninggalkan situs ini?")
    if (answer){
        alert("Bye bye!")
        window.location = "http://www.google.com/";
    }
    else{
        alert("Terima Kasih!")
    }
}
//-->
</script>
</head>
<body>
<form>
<input type="button" onclick="confirmation()" value="Leave Tizag.com">
</form>
</body>
</html>

◄ Newer Post Older Post ►