我有一个变种,我想追加多次与jQuery。代码是像这样:追加多个变量与jquery
var number = 4; //number of times the html must be appended
html = $("<div>Content here</div>"); //The html I want to append
$(document).ready(function() {
$("body").append(html * number); //Append the div multiple times
});
我不知道我怎样才能使HTML VAR附加在数VAR(4)中提到的次量?上面的代码不起作用,我可以看到为什么。但我看不到解决这个问题的方法。有任何想法吗? (我不是jQuery的专家!)
非常感谢,非常完美! –