摘要:
浏览器检测FILEREADERif(typeof FILEREADER == undefined) alert('浏览器不支持FILEREADER)方法名 参数 功能abort null 中断读取readAsBinaryString file 读取文件为二禁制码readAsDataURL file 读取文件为urlreadAsText file,[encoding] 读取文件为文本readAs... 阅读全文
posted @ 2012-01-08 16:01
风去无痕
阅读(631)
评论(0)
推荐(0)
摘要:
检测浏览器是否支持canvasvar canvas = document.getElementById('tutorial');if (canvas.getContext){ var ctx = canvas.getContext('2d'); // drawing code here} else { // canvas-unsupported code here}三个函数用于绘制矩形的:fillRect(x,y,width,height): Draws a filled rectangle 矩形strokeRect(x,y,width,height): Dra 阅读全文
posted @ 2012-01-05 21:02
风去无痕
阅读(355)
评论(0)
推荐(0)
摘要:
function getSelectText() { return document.selection && document.selection.createRange().text || window.getSelection && window.getSelection() || document.getSelection && document.getSelection() || '';}function getSelectText(){ var txt = null; if (window.getSelection){ 阅读全文
posted @ 2012-01-04 20:44
风去无痕
阅读(202)
评论(0)
推荐(0)
浙公网安备 33010602011771号