|
<! DOCTYPE html> |
|
|
|
|
|
<meta CharSet= "utf-8" > |
|
<title> </title> |
|
|
|
<body> < three ways to!--JS-- |
|
<script Type= 'text/javascript' > |
|
<!-- |
|
Alert (' The Wheat College JS course begins '); |
|
- |
|
</script> |
|
<script src= "test1.js" type= "text/javascript" charset= "utf-8" > </script> |
|
<noscript> |
|
Your browser does not support JavaScript, please change the view |
|
</noscript> |
|
<a href= "javascript:confirm (' Are you sure you want to enroll for a JavaScript course?") ') ' > registration </a> |
|
<p onclick= "javascript:alert (' Hello World ');" >clickme</p> |
|
</body> |
|
Text2.html
<! DOCTYPE html>
<meta charset= "Utf-8" >
<title></title>
<body>
<script type= "Text/javascript" >
document.write (' AAA ');
document.write (' <br/> ');
document.write (' BBB ');
document.write (' CCC ');
document.write (' ddd ');
document.write (' <br/> ');
document.write (' hello\
World ');
(\) Reflection Line
Street Notes
/*
Multi-line comments
*/
/*
Writing content to a document through document.write ()
Writing content to the console via Console.log ()
Errors in JavaScript
1. Debugging via the console
2. Debug via Alert ()
*/
Console.log (' Write content to console ');
alert (test);
Alert (' This is test ');
</script>
</body>
|
This article from "11021497" blog, declined reprint!
Introduction to Java Script in the first lesson of Java script