First, the HTML
1. radio button <form action= "><inpput type=" Radio "name=" Sex "value=" male ">Male</br> <input type=" Radio " Name= "Sex" value= "female" >Female</form>
2. check box <form action= "><inpute type=" checkbox "name=" vehicle "value=" Car ">i have a car</form>
3. Drop-down list <form action= "" ><select name= "car" ><option value= "Volo" >volo</option><option Value= "Fita" >Fita</option></select></form>
If you set an item selected direct <option value= "FEM" selected>fem</option>
4. Set text field <textarea rows= "cols=" ></textarea> Create button <input type= "button" Value=helloworld ">
5, <iframe src= "demo_iframe.html" name= "Iframe_a" ></iframe>
<p><a href= "http://www.runoob.com" target= "Iframe_a" >Runnob.com</a></p> because a The tag's target property name is the iframe frame of inframe_a, and the page will appear in the IFRAME after clicking on the link.
6, script JavaScript <p id= "Demo" >javascriptkeyi can trigger time </p>
<script> function MyFunction () {
Document.getelementid ("Demo"). Innerhtml= "Hello JavaScript";} </script>
<button type= "button" onclick= "MyFunction ()" > Click </button>
Change style,<script> function myFunction () {
X=document.getelementbyid ("demo")
X.style.color= "3ff0000";} </script> <button type= "button onclick=" MyFunction () "></button>
7, placeholder, HTML Unified Resource Locator, uniform Resource Locators
HTML5 for multimedia settings, <video width= "" "height=" Controls><source src= "Movie.mp4" type= "Video/mp4" >< SOURCE src= "Movie.ogg" type= "Video/ogg" ></video>
8, <srcipt>document.createelement ("Myhero") </script> <style> myhero{
Dispaly:block;
Background-color: #ddd;
padding:50px;
font-size:30px;} </style> <myHero> my elements </myHero>
9, Canvas label definition canvas, <canvas id= "MyCanvas" width= "" height= "" style= "border:1px solid #000000; >
Use JavaScript to draw <canvas id = "MyCanvas" width= "height=" style= "brorder:1px" Solid #3c3c3; " ></canvas >
<.script> var C=document.getelement.byid ("MyCanvas"); var Ctx=c.getcontext ("2d");
Ctx.filstyle= "#FF0000"; Ctx.fillrect (0,0,150,75);</script>
10. Use canvas canvas to draw a line <canvas id= "MyCanvas" width= "height=" "style=" border:1px solid #d3dd3d3; ></canvas>
<script> var C=document.getelementbyid ("MyCanvas");
var Ctx=c.getcontext ("2d");
Ctx.moveto (0,0);
Ctx.lineto (500,400);
Ctx.stroke ();</script>
11. Use canvas to draw a circle <canvas id-"" MyCanvas "width=" "height=" "style=" border:1px solid 3d3d3d3; ></canvas>
<script> var C=document.getelementbyid ("MyCanvas");
var Ctx=c.getcontext ("2d");
Ctx.beginpath ();
Ctx.arc (95,50,40,0,2*MATH.PI);
Ctx.stroke ();</script>
12, the use of canvas to draw a solid font <canvas id= "MyCanvas" width= "a" height= "" style= "" broder:1px solid #d3d3d3 "; ></canvas& Gt
<script> var C=document.getelementbyid ("MyCanvas");
var Ctx.c.getcontext ("2d");
ctx.font= "30px Arial"; Ctx.filltext ("Hello World", 10,50);</script> if is painted hollow garden modified into ctx.stroketext ("Hello World" 10,50);
13, Cavans color gradient two ways to create a key gradient createlineargradient (x,y.x1,y1) Create key line gradient
Createradialgradient (X,Y,R,X1,Y1,R1) key A radial circle gradient
The canvas is all the same here no more, draw directly on the canvas as follows:
<scrippt>
var C=document.getelementbyid ("MyCanvas");
var Ctx=c.getcontext ("2d");
var grd=ctx.createlineargradient (0,0,200,0);
Grd.addcolordtorp (0, "red");
Grd.addcolorstop (1, "Black");
CTX.FILSTYLE=GRD; Ctx.fillrect (10,10,150,80);</script> "! --here if the radial gradient only needs to modify the function Ctx.createradialgradienti (0,0,200,1) "
14. Place the image on the canvas
<canvas id= "MyCanvas" width= "" height= "style=" "border:1px solid 3d3d3d3;" ></canvas>
<script> var C=document.getelementbyid ("Mucanvas");
var Ctx=c.getcontext ("2d");
var Img=docment.getelementbyid ("Scream");
Img.onload=function () {
Ctx.drawimage (img,10,10);} </script>
Html&javaskcript&css&jquery&ajax (ix)