Javascript
* can be read on the head (first read the head)
The page is automatically refreshed when the form is submitted, preferably turned off
Writing:
1. Output
<script>
document.write ("Hello World");
</script>
2. Button Application
<input name= "alert" value= "alert" type= "button" onclick= ' Alert ("This is the trigger event") '/>
3. Define variables and output
var Bianliang;
Bianliang= "123";
document.write (Bianliang);
4. Changing the attributes of an element
<p id= "Hello" >hello</p>
<script>
function Hello ()
{
X=document.getelementbyid ("Hello")
X.style.color = "#ff0000";
}
</script>
<input type= "button" value= "Click to change Color" onclick= "hello ()"/>
<!--click From Black to red--
5 , Item index, indicating the first N an element that appears, with the Getelementsbyname simultaneous use
Define a set of variables
var student =
{
Name: " Zhang San ",
Sex: " male "
};
student.name= " Zhang San ";
document.write (Student.name);
( * print "Zhang San")
External calls JS
<script src= "" ></script>
5, Web page production of Dreamweaver (JS preliminary application)