javascript:如何在HTML img元素支持中检测SVG?
我试过这个,但它不起作用:
x = new Image(); x.onload = function(){ if (x.width) { alert('svg in img tag supported!'); } }; x.src = 'test.svg';
javascript svg detect
detect ×1
javascript ×1
svg ×1