1
나는 이전 jQuery 모바일 경험이 없으며 이제 javascript에 동적으로 새 확인란을 추가하려고합니다. (HTML 헤드)jQuery 모바일 : 동적으로 확인란 추가
사용하여 HTML의
jquery.mobile-1.4.5.min.css
jquery-1.11.3.min.js
jquery.mobile-1.4.5.min.js
부분 : 자바 스크립트
<form>
<fieldset data-role="collapsible">
<div id="agree" data-role="controlgroup"></div>
<input type="submit" value="Submit">
</fieldset>
</form>
부분 : 만 일반 체크 박스, 아니 서식을 얻고있다
var html = '<input type="checkbox" name="checkbox-1" id="checkbox-1" /><label for="checkbox-1">I agree</label>';
$('#agree').html(html);
$("input[type='checkbox']").checkboxradio("refresh");
. 무엇이 잘못 되었나요? 내가 놓친 게 있니?
사용중인 JQuery 버전을 알 수 있도록 작업 스 니펫, JSFiddle을 공유해 주시겠습니까? –
여기에 몇 가지 예제가 있습니다 : [동적으로 jQuery Mobile에 체크 박스가있는 제품 목록 생성] (https://stackoverflow.com/questions/41325900/dynamically-creating-productlists-with-checkboxes-in-jquerymobile-proves-difficu/41484070) # 41484070) 및 여기 : 항목을 추가 할 때 [Jquery Mobile checkbox-list가 업데이트되지 않고 스타일을 새로 고치기] (https://stackoverflow.com/questions/41404047/jquery-mobile-checkbox-list- 추가하지 않을 때 업데이트하지 않고 항목을 새로 고침/41409019 # 41409019) – deblocker