Pages

Subscribe Twitter Twitter

Membuat Alert Box dengan Konfirmasi

Selasa, 14 September 2010 ·

<html>
<head>
<script type="text/javascript">
function konfirm()
{
var r=confirm("Press a button!");
if (r==true)
{
alert("OK!");
}
else
{
alert("Batal!");
}
}
</script>
</head>
<body>

<input type="button" onclick="konfirm()" value="Show a confirm box" />

</body>
</html>

0 komentar: