이 오류를 해결할 수있는 방법 :나는 "아니오 방법 'appendTo'오류를 해결할 수있는 방법
catch되지 않은 형식 오류 :
function refresh(){
$('#contacts').empty();
$("#contactTmpl").tmpl({contacts:contacts}).appendTo("#contacts");
$(".contact").each(function(i) {
var contact = contacts[i];
$("input.tomap", this).link(contact);
});
}
<script type="text/javascript" src="a.js"></script>
<form>
<div id="contacts">Loading ...</div>
<button class="add">New</button>
<button class="save"> Save</button>
</form>
<script id="contactTmpl" type="text/x-jquery-tmpl">
{{each contacts}}
<div class="contact" data-index="${$index}">
<label>First name</label> <input class="tomap" name="firstName" value="${firstName}">
<label>Last name</label> <input class="tomap" name="lastName" value="${lastName}">
<label>Number</label> <input class="tomap" name="phone" value="${phone}">
<div class="tools">
<button class="delete"</button>
</div>
</div>
{{/each}}
</script>
: 개체가있는 방법 'appendTo' 다음과 같은 코드가 없습니다 이것은 HTML과 자바 스크립트 코드를 먼저 노드를 만들 필요가
. 언제 새로 고침()이 호출 되나요? 문서가 준비되거나로드 된 후, 나는 희망한다. a.js의 내용은 무엇입니까? 보고 싶은 바이올린을 던질 수 있을까요? – Kato