js代码如下:
var cav = document.getElementById("a").getContext("2d");
function draw(x, y,c){
cav.beginPath();
cav.fillStyle = c;
cav.moveTo(x, y);
cav.lineWidth = 3;
cav.bezierCurveTo(130 ,65,150,110,100,150);
cav.bezierCurveTo(35,85,95,75,100,100);
cav.closePath();
cav.stroke();
cav.fill();