小白问一个HTML5的初级问题 是jquery的问题么!为什么没有图形输出啊!求指导
<!DOCTYPEhtml><html><head><title>LoveofBotaskyPage</title><metahttp-equiv='Content-Ty...
<!DOCTYPE html>
<html>
<head>
<title>Love of Botasky Page</title>
<meta http-equiv='Content-Type' content='text/html; charset=utf-8'>
<script type='text/javascript' src='jquery-1.4.4.js'></script>
<script type='text/javascript'>
$(document).ready(function{
var canvas = $('#myCanvas');
var context = canvas.get(0).getContext('2d');
context.fillRect(40,40,100,100);
});
</script>
</head>
<body>
<h1>fuck</h1>
<canvas id='myCanvas' width='500' height='500'>
</canvas>
</body>
</html> 展开
<html>
<head>
<title>Love of Botasky Page</title>
<meta http-equiv='Content-Type' content='text/html; charset=utf-8'>
<script type='text/javascript' src='jquery-1.4.4.js'></script>
<script type='text/javascript'>
$(document).ready(function{
var canvas = $('#myCanvas');
var context = canvas.get(0).getContext('2d');
context.fillRect(40,40,100,100);
});
</script>
</head>
<body>
<h1>fuck</h1>
<canvas id='myCanvas' width='500' height='500'>
</canvas>
</body>
</html> 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询