Java code
Copy Code code as follows:
<title>javascript</title>
<script type= "Text/javascript" >
function test (inval) {
try{
Inval=inval.touppercase ();
}catch (Error) {
Alert ("An exception has occurred. Error was:\n\n "+error.message);
}
}
</script>
<body>
<input type= "button" value= "Test" onclick= "test (null);" >
</body>
Copy Code code as follows:
<title>javascript</title>
<script type= "Text/javascript" >
function test (inval) {
try{
Inval=inval.touppercase ();
}catch (Error) {
Alert ("An exception has occurred. Error was:\n\n "+error.message);
}
}
</script>
<body>
<input type= "button" value= "Test" onclick= "test (null);" >
</body>
Using Firefox's firebug to tune Bugs
Reference
Copy Code code as follows:
<title>javascript</title>
<script type= "Text/javascript" >
function Test () {
var a=0;
Console.log ("Checkpoint 1");
a=a+1;
Console.log ("Checkpoint 2");
A=a-1;
Console.log ("Checkpoint 3");
A=a.tolowercase ();
Console.log ("Checkpoint 4");
}
</script>
<body>
<input type= "button" value= "Test" onclick= "test (null);" >
</body>
In IE, you can add a method
Reference
Copy Code code as follows:
function Console () {
This.log=function (intext) {
alert (intext);
}
}
var console=new console ();