Canvas Test

By thomasdreams at 2015-07-28 • 0人收藏 • 73人看过
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
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>

2015-07-28   #2

回复#1 @thomasdreams :

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

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

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.

登录后方可回帖

登 录
信息栏
购买PHP虚拟主机 / VPS

Carbon Forum是一个基于话题的高性能轻型PHP论坛

下载地址:Carbon Forum v5.0.1
QQ群:12607708(QQ我不常上)

donate

手机支付宝扫描上方二维码可向本项目捐款

Loading...