js在ie10以下运行不了
作用是改变sl输入框里的值后,je输入框等于数量和单价的乘积,会实时显示。<scripttype="text/javascript">functionddd(){vard...
作用是改变sl输入框里的值后,je输入框等于数量和单价的乘积,会实时显示。
<script type="text/javascript">
function ddd() {
var djs = document.querySelectorAll("#dj");
var sls = document.querySelectorAll("#sl");
var jes = document.querySelectorAll("#je");
for (var i = 0; i < djs.length; i++) {
var num1 = djs[i].value;
var num2 = sls[i].value;
var num3 = jes[i];
num3.value = num1 * num2;
}
}
</script>
<input id="sl" style="width:50px;" name="spsl" type="text" value="<%=rs1.getDouble("spshul") %>" oninput="ddd()" onPropertyChange="ddd()" onblur="ddd()" onchange="ddd()"/>
<input id="je" style="width:50px;" name="spje" type="text" value="<%=rs1.getDouble("spjine") %>"/>
js在ie10以下和360兼容模式下运行不了,在谷歌和IE11能运行。该怎么改?
献下丑吧,我改了一下不能用了~ 展开
<script type="text/javascript">
function ddd() {
var djs = document.querySelectorAll("#dj");
var sls = document.querySelectorAll("#sl");
var jes = document.querySelectorAll("#je");
for (var i = 0; i < djs.length; i++) {
var num1 = djs[i].value;
var num2 = sls[i].value;
var num3 = jes[i];
num3.value = num1 * num2;
}
}
</script>
<input id="sl" style="width:50px;" name="spsl" type="text" value="<%=rs1.getDouble("spshul") %>" oninput="ddd()" onPropertyChange="ddd()" onblur="ddd()" onchange="ddd()"/>
<input id="je" style="width:50px;" name="spje" type="text" value="<%=rs1.getDouble("spjine") %>"/>
js在ie10以下和360兼容模式下运行不了,在谷歌和IE11能运行。该怎么改?
献下丑吧,我改了一下不能用了~ 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询