ITeye博客

HTML5

共 5 篇文章

Web Worker

<!DOCTYPE html> <html> <body> <p>Count numbers: <output id="result"></output></p> <button onclick="startWorker()">Start Worker</button> <button onclick="stopWorker()">Stop Worker</button> <br /><br /> <script> var w; function startWorker() { if(typeof(Worker)!=="undefined") { if(typeof(w)=="undefin…

2012-06-30 13:47 · HTML5

WEB存储

一、概述 HTML5 web storage, a better local storage than cookies. What is HTML5 Web Storage? With HTML5, web pages can store data locally within the user's browser. Earlier, this was done with cookies. However, Web Storage is more secure and faster. The data is not included with every server request, bu…

2012-06-29 15:12 · HTML5

矢量图

一、概述 HTML5 has support for inline SVG. SVG What is SVG? SVG stands for Scalable Vector Graphics SVG is used to define vector-based graphics for the Web SVG defines the graphics in XML format SVG graphics do NOT lose any quality if they are zoomed or resized Every element and every attribute in SVG …

2012-06-29 11:29 · HTML5

画布功能

The <canvas> element is used to draw graphics, on the fly, on a web page. 一、概述 What is Canvas? The HTML5 <canvas> element is used to draw graphics, on the fly, via scripting (usually JavaScript). The <canvas> element is only a container for graphics, you must use a script to actually draw the graph…

2012-06-29 11:18 · HTML5

拖拽功能

<!DOCTYPE HTML> <html> <head> <style type="text/css"> #div1 {width:190px;height:210px;padding:10px;border:1px solid #aaaaaa;} </style> <script type="text/javascript"> function allowDrop(ev) { ev.preventDefault();//阻止控件的默认行为 } function drag(ev) { //alert(ev.target.id); ev.dataTransfer.setData("",ev.…

2012-06-29 10:55 · HTML5