Kamis, 04 Oktober 2012

Javascript Confirm

<html>
<head>
<body onload="ask()">
<title>Javascript Confirm</title>
<script type="text/javascript">
function ask()
{
var x;
x = confirm("Press Button!");
if(x==true)
{
alert("you press OK!");
}

else
{
alert("you press CANCEL!");
}
}
</body>

</head>
</html>

Javascript Alert

<html>
<head>
<body onload="x()">
<title>Belajar Javascript</title>
<script hello="hello" script="script" type="text/javascript&gt;
function x()
{
alert(">
</body>

</head>
</html></script></body></head></html> Belajar Javascript