-1
我不能畫任何東西,有沒有人看到錯誤?我想按下按鈕時嘗試,沒有工作,當文檔準備好也沒有工作。JCanvas沒有工作我不能畫任何東西
<!doctype html>
<html>
<head>
<script src='jcanvas.min.js'></script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<meta charset="utf-8">
<title>IO</title>
<script>
$(document).ready(function(){
$('#act').click(function(){
$('canvas').drawArc({
fillStyle: 'black',
x: 100, y: 100,
radius: 50
});
});
$('canvas').drawArc({
fillStyle: 'black',
x: 100, y: 100,
radius: 50
});
});
</script>
</head>
<body>
<button id="act" type="button">Actualizar</button>
<p> </p>
<p>
<input type="number" name="quantity" min="-100000" max="100000">
</p>
</p>
<canvas id='can' width='500' height='500'></canvas>
</body>
</html>
仍然不工作,我下載jQuery來確保心不是網絡的問題,我用'' – Pulse9 2014-11-02 17:20:08
重新檢查,如果線加載的jQuery在
以上加載JCanvas的線。我在本地機器上測試過,效果很好。確保您的瀏覽器支持畫布。 – Chitrang 2014-11-02 18:20:38是的,我解決了它謝謝你! – Pulse9 2014-11-02 18:20:58