HTML5 of the vedio and audio elements, the compatibility of the two are very good at present, so when writing to consider the alternatives;
HTML5 form elements: email, url, data, number, range, search, tel, color
Let's put a small example of a canvas below:
<!DOCTYPE HTML><HTML><Head><Metahttp-equiv= "Content-type"content= "text/html; charset=utf-8"><title>Small instance of Canvas</title></Head><Body><CanvasID= "Draw-in-me"width= "+"heigt= "Max"><P>Powered by HTML5 Canvas</P></Canvas><Script> functionDraw () {varCanvas=document.getElementById ('Draw-in-me'); if(canvas.getcontext) {varCTX=Canvas.getcontext ('2d'); Ctx.beginpath (); Ctx.moveto (120.0,32.0); Ctx.beziercurveto (120.0, 36.4, 116.4, 40.0, 112.0, 40.0); Ctx.lineto (8.0, 40.0); Ctx.beziercurveto (3.6, 40.0, 0.0, 36.4, 0.0, 32.0); Ctx.lineto (0.0, 8.0); Ctx.beziercurveto (0.0, 3.6, 3.6, 0.0, 8.0, 0.0); Ctx.lineto (112.0, 0.0); Ctx.beziercurveto (116.4, 0.0, 120.0, 3.6, 120.0, 8.0); Ctx.lineto (120.0, 32.0); Ctx.closepath (); Ctx.fill (); Ctx.linewidth= 2.0; Ctx.strokestyle= "RGB (255, 255, 255)"; Ctx.stroke (); }} draw (); </Script></Body></HTML>
View Code
JS DOM Programming Art--HTML5--JS Learning note 2015-7-24 (91st Day)