📜  使用百分比计算自动填充表单 javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:31.943000             🧑  作者: Mango

代码示例1
function mult(value) {
    var w, x, y, z;

    x = 3;
    y = (x / 100) * parseInt(value);
    z = parseInt(value) + parseInt(y);


    document.getElementById('percent').value = y;
    document.getElementById('total').value = z;
}