document.getElementById("txt1").value的類型是string,需要將其轉(zhuǎn)換成數(shù)值型,才能實(shí)現(xiàn)想要的結(jié)果。learning...

Linda125924
2014-06-03
1 回答
舉報(bào)
0/150
提交
取消
2014-06-03
使用parseInt()函數(shù)。