jQuery를 여러 번 추가하려는 var가 있습니다. 내가 html로 var에 숫자 VAR (4)에서 언급 된 시간의 양을 추가 할 수있는 방법 궁금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
});
: 코드는 지금처럼? 위의 코드는 작동하지 않으며 그 이유를 알 수 있습니다. 그러나 나는 그것을 고치는 방법을 볼 수 없다. 어떤 아이디어? (저는 jQuery에서 훌륭한 전문가가 아닙니다!)
고마워, 완벽하게 일했다! –