JavaScript 代码段在 IE/Edge 中不起作用
JavaScript snippet not working in IE/Edge
因此在 Chrome 和 Firefox 中这有效:
<output for="priceSlider" id="priceLevel">0</output>
<script>
function output(prc) {
document.querySelector('#priceLevel').value = "$"+prc/100;
}
</script>
它会随着滑块的移动而更改价格,还会将其更改为我希望的外观。在 Edge/IE 中它什么都不做。我需要为 Edge/IE 更改什么吗?
<output>
IE 不支持标签。
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/output
因此在 Chrome 和 Firefox 中这有效:
<output for="priceSlider" id="priceLevel">0</output>
<script>
function output(prc) {
document.querySelector('#priceLevel').value = "$"+prc/100;
}
</script>
它会随着滑块的移动而更改价格,还会将其更改为我希望的外观。在 Edge/IE 中它什么都不做。我需要为 Edge/IE 更改什么吗?
<output>
IE 不支持标签。
https://developer.mozilla.org/en-US/docs/Web/HTML/Element/output