PrototypeJSでは、複数のElementオブジェクトを要素に挿入するためのより効率的な方法はありますか?これが私が今持っているコードです:
var calendar_elem = new Element('div', {
'id': 'my_calendar'
}).insert({
bottom: title_elem // assume these are all Element objects
}).insert({
bottom: days_of_week_elem
}).insert({
bottom: month_calendar_elem
}).insert({
bottom: footer_elem
});
bottom
インデックスに配列を含めることはできますか、それともHTMLの要素/文字列を1つだけ含める必要がありますか?edされている各要素のHTMLを取得し、それらを連結して、代わりにinsert
それを渡す方が効率的でしょうか?bottom
ありがとう!