我正在动态创建一个元素我如何给这个ID?动态创建ID
_addQuestionElement : function() {
var el = new Element('div');
el.addClass('dg-question-label');
el.set('html', this._getCurrentQuestion().label);
$(this.html.el).adopt(el);
},
即时通讯使用moo工具和jquery。
非常感谢
动态地为随机生成的,或只是想知道如何在代码中设置一个特定的ID? – dom 2012-08-07 13:03:53