HTML5 canvas jQuery getContext on classes

前端 未结 3 375
清酒与你
清酒与你 2021-01-14 16:06

This code works:


    

        
3条回答
  •  感情败类
    2021-01-14 16:41

    That is because you are using class in jquery.

    Change this

    var context = $('.dropzone').getContext('2d');

    to

    var context = $('#dropzone').getContext('2d');

提交回复
热议问题