Use alert dialog as a way to debug : debug « Development « JavaScript Tutorial






<html>
<head>
<title>Debug Example</title>
<script type="text/javascript">

function myfunction() {
    alert("Entering function.");

    var iNumber1 = 5;
    var iNumber2 = 10;

    alert("Before calculation.");
    var iResult = iNumber1 + iNumber2;
    alert("After calculation.");
}

myfunction();


</script>
</head>
<body>
</body>
</html>








4.5.debug
4.5.1.Use alert dialog as a way to debug
4.5.2.Write some messages to the Java console