尝试点击画布,没有任何反应。我做错了什么?
<html>
<head>
<title>canvas tap</title>
<script src="http://code.jquery.com/jquery-1.7.1.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('#my_canvas').bind('tap', function() {
alert("Canvas pressed!");
});
});
</script>
</head>
<body>
<div id="div1" style="width:auto;height:auto;background-color:yellow">
<canvas id="#my_canvas" width="200" height="200"></canvas>
</div>
</body>
</html>
谢谢!