Join our server on Discord

JavaScript Error !!!
#1
Hello Everyone,
I am trying to getting error message box using javaScript.
But not getting desired result.
The code is :

Code:
<html>
<head>
<script type="text/javascript">
var txt="";
function message()
{
try
  {
  adddlert("Welcome guest!");
  }
catch(err)
  {
  txt="Error.\n\n";
  txt+="Error description: " + err.description + "\n\n";
  txt+="OK to continue.\n\n";
  alert();
  }
}
</script>
</head>

<body>
<input type="button" value="View message" onclick="message()" />
</body>

</html>

Can anyone help me?
Reply
#2
I thought you meant Dr Java...sad face.
Reply