Firefox下操作html对象
function write_in(){var attend_days = document.getElementById("a_d").value;var huoshi = document.getElementById("hs").value;var weisheng = document.getElementById("ws").value;var shui = document.getElementById("s").value;var length = document.getElementsByName("depart_payroll[payroll_atts][][attend_days]").length;for (var i = 0; i < length; i++) {document.getElementsByName("depart_payroll[payroll_atts][][attend_days]")[i].value = attend_days;document.getElementsByName("depart_payroll[payroll_atts][][huoshi]")[i].value = huoshi;document.getElementsByName("depart_payroll[payroll_atts][][weisheng]")[i].value = weisheng;document.getElementsByName("depart_payroll[payroll_atts][][shui]")[i].value = shui;}}