当我从visualstudio 2012 express运行它时,为什么它不能在我的Firefox中工作。它适用于 jsfiddle.net
<!DOCTYPE HTML>
<html>
<head>
<title></title>
<style>
body {
margin: 0px;
padding: 0px;
}
</style>
</head>
<body>
<canvas id="myCanvas" width="578" height="200"></canvas>
<script>
var canvas = document.getElementById('myCanvas');
var context = canvas.getContext('2d');
context.beginPath();
context.moveTo(100, 150);
context.lineTo(450, 50);
context.stroke();
</script>
</body>
</html>