JavaScript-program 2
Posted On Friday, June 12, 2009 at at 12:21 AM by RashedJavaScript is not work in all browsers. These browsers do not show
all the elements or writings within the <Script>.......</Script>
. So to make JavaScript usefull for all browsers, we have to use non script tag.
The non script tag is <!--begin hiding Javascript
and it is end with //End hiding JavaScript--> .
Actually it is comment code that hide the JavaScript from the browsers
those do not support JavaScript. Browsers that support the JavaScript language just ignore the Comment.
You can only use <!-- and end the code as //-->
Here is the Total code:
<html>
<head>
<title>JavaScript</title>
</head>
<body>
<Script Language="JavaScript">
<!--Begin hiding JavaScript
document.write("Welcome to Java World")
//End hiding JavaScript-->
</Script>
</body>
</html>