Canvas Test

Canvas Test

By thomasdreams at 2015-07-28
0人收藏 • 1343人看过

Your browser does not support the canvas element.var c=document.getElementById("myCanvas"); var cxt=c.getContext("2d"); cxt.fillStyle="#FF0000"; cxt.beginPath(); cxt.arc(70,18,15,0,Math.PI*2,true); cxt.closePath(); cxt.fill();

4 个回复 | 最后更新于 2015-07-31
thomasdreams
2015-07-28
#1

canvas标签出现错误。源码:

<canvas id="myCanvas" width="200" height="100" style="border:1px solid #c3c3c3;">
Your browser does not support the canvas element.
</canvas>

<script type="text/javascript">

var c=document.getElementById("myCanvas");
var cxt=c.getContext("2d");
cxt.fillStyle="#FF0000";
cxt.beginPath();
cxt.arc(70,18,15,0,Math.PI*2,true);
cxt.closePath();
cxt.fill();

</script>

lincanbin
2015-07-28
#2

回复#1 @thomasdreams :

帖子不能插入script,会导致xss。

如果允许插入,这个网站就离倒闭不远了。

thomasdreams
2015-07-28
#3

Your browser does not support the canvas element.

源码:

<canvas id="myCanvas" width="200" height="100" style="border:1px solid #c3c3c3;">
Your browser does not support the canvas element.

简单
2015-07-31
#4

Your browser does not support the canvas element.


登 录


现在注册

QQ  登 录    Weibo  登 录    GitHub  登 录