2012-01-11 6 views

答えて

2

あなたがしたいのか各行にセルを追加するのは正しいですか?その場合は:

prototype.jsの:

$$("tr").each(function(tr){ 
    $(tr).insert('<td>Content of the new cell</td>') 
}) 

のjQuery:

$("tr").append("<td>Content of the new cell</td>") 
+0

'.append'呼び出しで、なぜ機能ラッパー? – zetlen

+0

全く理由はありません。同じサンプルをコピーしただけで、jQueryではappendメソッドに文字列を使用できます –

関連する問題