html中插入javascript画矩形
来源:互联网 发布:通信算法工程师 工作 编辑:程序博客网 时间:2024/06/06 05:43
<!DOCTYPE <!DOCTYPE html><html><head><meta charset="utf-8"/><title>canvas元素示例</title><script>function draw(id){var canvas = document.getElementById(id);if(canvas == null)return false;var context = canvas.getContext('2d');context.fillStyle = "#eeefff";context.fillRect(0,0,400,300);context.fillStyle = "green";context.strokeStyle = "red";context.lineWidth = 1;context.fillRect(50,50,100,100);context.strokeRect(50,50,100,100);}</script></head><body onload="draw('canvas');"><h1>canvas中画矩形</h1><canvas id="canvas" width="400" height="300"/></body></html>
阅读全文
0 0
- html中插入javascript画矩形
- html中插入javascript脚本画条直线
- Html中插入javascript不识别问题
- 在HTML中插入JavaScript代码的方式
- 怎样用javascript在html中插入一段代码
- JavaScript基础:在HTML中插入js代码
- javascript动态插入html元素
- html中插入背景音乐
- HTML中插入flash
- html中插入mediaplayer
- html中插入图片
- html中插入map
- html中插入图片
- javascript -- 动态创建HTML元素并插入到dom tree中
- xsl中插入HTML特殊符号
- iframe中如何插入html
- iframe中如何插入html
- 在Html中插入flash
- html中插入javascript脚本画条直线
- 怎么把本地项目和远程git仓库相连通
- range、xrange 和 randrange 的用法和区别
- pip install whl 错误版本解决(暨在win7 python3下装 opencv)
- OCR和votedisk备份与还原
- html中插入javascript画矩形
- str2float
- JVM学习(初识JVM)
- 雷军说小米6下月起不再耍猴 你信吗?
- 作业批处理
- Python学习笔记(四)
- oracle克隆安装(转)
- 开发中遇到的坑.
- Docker