但我在浏览器中看不到任何结果,除了默认的图像“img src”。请有人帮助我。我怎样才能使用这个功能?
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Demo</title>
<canvas width="500" height="250"></canvas>
</head>
<script src="jquery.js"></script>
<script src="jcanvas.js"></script>
<script>
$("canvas").drawImage({
source: $('#draggable')[0],
x: 50, y: 50,
width: 60,
fromCenter: false
});
</script>
<body>
<img src="../image/0.jpg" class="drag-image" id="draggable"/>
</div>
</body>
</html>
谢谢。