为什么在下面的代码中,只有显式的 Javascript 版本有效,而 Jquery 版本无效(已注释掉)?
<html>
<head>
<title>Canvas Tutorial</title>
<script type="text/javascript" src="./jquery-1.6.3.min.js"></script>
</head>
<body>
<canvas id="can" width="150" height="150">Fallback</canvas>
<script type="text/javascript">
//var can = $("#can").get();
var can = document.getElementById("can");
var ctx = can.getContext('2d');
</script>
</body>
</html>
我不断收到通知
TypeError: 'undefined' is not a function (evaluating 'can.getContext('2d')')