반응형 witdh1 [Javascript] 이미지 URL로 width, height 구하기 const img = new Image();img.src = 'url';img.onload = function() { const imgWidth = img.naturalWidth; const imgHeight = img.naturalHeight; console.log('imgWidth: ', imgWidth); console.log('imgHeight: ', imgHeight);}; 2024. 7. 12. 이전 1 다음 반응형