js实现连个数字相加而不是拼接的方法

前端技术 2023/09/04 JavaScript
实现e1 的值 与 e2 相加
复制代码 代码如下:

var e1= document.getElementById(\'textbox1\').value;
var e2 = document.getElementById(\"textbox2\").value;
document.getElementById(\'textbox4\').value = parseInt(e1)+parseInt(e2);

本文地址:https://www.stayed.cn/item/9209

转载请注明出处。

本站部分内容来源于网络,如侵犯到您的权益,请 联系我

我的博客

人生若只如初见,何事秋风悲画扇。