카테고리 없음

CANVAS 이미지 업로드 (jquery)

되꼬다음 2020. 8. 31. 17:55
반응형
<script>
function upload_image()
{
	var c = document.getElementById("user_image");

	var req = $.ajax({
			type : "POST"
			, data : {upload_image:c.toDataURL("image/png")}
			, url : "http://111.222.333.444/upload.php"
			, success : function(res)
			{
				alert(res);
			}
		});
}
</script>

<canvas id="user_image" width="500" height="500"></canvas>


 

반응형