Home  >  Article  >  Web Front-end  >  Why is the html5 code not working this time? Novice please help_html/css_WEB-ITnose

Why is the html5 code not working this time? Novice please help_html/css_WEB-ITnose

WBOY
WBOYOriginal
2016-06-24 12:14:12876browse





无标题文档





<script> <br> function createRetcs(context) <br> { <br> <br> context.beginPath(); <br> context.fillStyle="rgb(200,0,0)"; <br> context.fillRect(10,10,100,100); <br> context.fillStyle="rgb(0,200,0)"; <br> context.fillRect(20,20,100,100); <br> context.fillStyle="rgb(0,0,200)"; <br> context.fillRect(30,30,100,100); <br> context.closePath(); <br> } <br> function drawRects() <br> { <br> var canvas=document.getElementById('myCanvas'); <br>     var contex=canvas.getContext('2d'); <br> context.save(); <br> context.translate(130,200); <br> context.lineWidth=4; <br> context.lineJoin='round'; <br> createRetcs(context); <br> context.stroke(); <br> context.restore(); <br> } <br> </script>



回复讨论(解决方案)

canvas我还没开始研究……

用火狐8.0.1测画出来了个框,查查语句。

用火狐8.0.1测画出来了个框,查查语句。
没明白才问哒

嗯  同样的问题

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn