Create a script block
<script language= "JavaScript" >
JavaScript Code goes here
</script>
Hide Script code
<script language= "JavaScript" >
<!--
document.write ("Hello");
-->
</script>
Display when the browser is not supported
<noscript>
Hello to the Non-javascript browser.
</noscript>
Linking external script files
<script language= "JavaScript" src= "/" Youname.js "></script>
Comment Script
This is a comment
document.write ("Hello"); This is a comment
/*
All of this
is a comment
*/
Output to Browser
document.write ("<strong> output Content </strong>");
Defining variables
var myvariable = "some value";
string addition
var myString = "String1" + "String2";
String search
<script language= "JavaScript" >
<!--
var myvariable = "Hello There";
var thereplace = Myvariable.search ("there");
document.write (Thereplace);
-->
</script>
String substitution
Thisvar.replace ("Monday", "Friday");
Current 1/3 page
123 Next read the full text