你这不是wpf。。或者siverlight方面的吗?。。怎么发到这来了
解决方案 »
- eclipse写JSP程序出现乱码
- IE6 想用js关掉咯窗口。。。 怎么办??
- 仿好123里百度搜索美化代码有木有?????
- IE和FF下的不同
- javascript ocx 事件 怎样封装到js脚本中!
- 我是新手,请帮忙修改一下以下javascript代码,以实现不同的邮箱登录
- 小问题document.frames(..)w3c标准里应该怎么写
- 关于日期的,具体请看内容
- window 对象有 parent 也就是它的父窗口.怎么判断一个 window 有没有 parent 也就是怎么判断一个 window 是不是最上层的 window 呢?
- *- 是什么意思?
- js报出参数无效错误
- window.parent为空或不为对象
ctx.beginPath();
画图形的代码
ctx.stroke();
这样试试
ctx.strokeRect(0,0,20,20);我这样写是可以的,还有可能就是浏览器问题,我在chrome下测试的,网上说目前chrome对html5的支持最好
var canvas = window.document.getElementById("canvas");
var cxt = canvas.getContext("2d");
cxt.fillStyle = null
console.log(cxt.fillStyle)
通过以上代码可以推测,凡是不合乎style定义的字符串赋值后,style都会变成#000000,即黑色。
var canvas = window.document.getElementById("canvas");
var cxt = canvas.getContext("2d");
cxt.fillStyle = null
console.log(cxt.fillStyle)//#000000通过以上代码可以推测,凡是不合乎style定义的字符串赋值后,style都会变成#000000,即黑色。