在Firefox浏览器中调整图像大小时图像消失

时间:2017-11-14 09:25:30

标签: javascript html firefox browser

Firefox图像在更改滑块(范围)时消失。 Firefox中没有调整图像大小。更改滑块时,图像消失。在chrome,IE浏览器中它正在运行。 如何在firefox浏览器中解决此问题。

<input type="range" id="rangeId" min=0 max="100" value="0">
   <img width="275" height="95" ng-show="!!file" ngf-thumbnail="file" id="imageId" />


        //Resize image
        var ranger = document.getElementById('rangeId'),
        image = document.getElementById('imageId'),
        width = image.width,
        height = image.height;

        ranger.onchange = function () {
              debugger;



              image.width = width * (ranger.value / 100);
              image.height =height * (ranger.value / 100);
        }

事先提前

0 个答案:

没有答案