function f1(){
document.getElementById("comment_show").innerHTML
="<form action='c.php' method='post'>a:"+
"<input type='text' name='d1'> <br>"+
"<textarea name='comment' rows='5' cols='100'> </textarea> <br>"+
"b:"+
"<input type='text' name='d2'> <br>"+
"<textarea name='comment' rows='5' cols='100'> </textarea> <br>"+
"c:"+
"<input type='text' name='d3'> <br>"+
"<textarea name='comment' rows='5' cols='100'> </textarea> <br>"+
"<input type='submit' name='s1' value='s1'> <br><br><br><br>"+
"</form>";
}
如何用JavaScript變量替換d1,d2,d3以使其成爲循環?如何在javascript函數中使用javascript變量獲取html輸入名稱?
' 「MyString的」 + MYVARIABLE + 「myOtherString」' –