⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 selform.js

📁 Harvestman-最新版本
💻 JS
字号:
function selectiveTotal(form, which){        var total = 0;        for(var j = 0; j < form.elements.length; j++){                var cid = form.elements[j].id.toString();                if ((form.elements[j].type == "text") &&                     (form.elements[j].value.length > 0) &&                     (cid.charAt(cid.length-1) == which) &&                     (cid != "total" + which))                {                        total += parseInt(form.elements[j].value);                }        }        document.getElementById("total" + which).value = total;        totalTheTotals("1","2","3");}function totalTheTotals(a, b, c){        var total = parseInt(document.getElementById("total" + a).value) + parseInt(document.getElementById("total" + b).value);        document.getElementById("total" + c).value = total;}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -