我认为这是您要寻找的:
更改表示表格数量的 计数 。
<html><head><title>Arithmetic operations</title></head><script type="text/javascript">function Multiplication(o1, o2, o3){ var x,y,z; x=o1.value; y=o2.value; z=x*y; o3.value=z}function calcForm(formNode){ Multiplication(formNode.value1, formNode.value2, formNode.value3);}</script></head><body><div ><form name="calc"> <h1>online Calculator</h1> Enter first Numeric Value : <input id="value1" type = "text" onchange = "calcForm(this.parentNode)" onkeypress = "this.onchange();" onpaste = "this.onchange();" oninput = "this.onchange();" onloadstart ="this.onchange();" value = "5" /> </br> Enter Second Numeric Value : <input id="value2" type = "text" onchange = "calcForm(this.parentNode)" onloadstart= "this.onchange();" onkeypress = "this.onchange();" onpaste = "this.onchange();" oninput = "this.onchange();" value = "1" /> </br> </br> Result of the Arithmetic operation is : <output type="number" id="value3"> </output></br> </form></div><div id="i_container"></div><script> count = 15; my_parent = document.getElementById('i_container'); for(i=0; i<count; i++){ nw = calc.cloneNode(true); nw.name = "dynamic_name_"+i; nw.id = "dynamic_id_"+i; my_parent.appendChild(nw); } for(i=0; i<count; i++){ p = document.getElementById("dynamic_id_"+i); calcForm(p); }</script></body></html>


