Why does the drawImage of canvas always say that the img parameter I gave is of the wrong type?

  var img = document.getElementById("testimg")
  console.log("img", img)
  console.log("typeimg", typeof (img))
  context.drawImage(img, 0, 0, 750, 1334)

so how exactly do you need to pass it on?

Jan.17,2022

found a problem. It is a referencing problem of static resources. no, no, no.

Menu