이 문서는 읽기 전용입니다. 원본을 볼 수는 있지만 바꿀 수는 없습니다. 문제가 있다고 생각하면 관리자에게 문의하세요. ====== 버튼 타입 가이드 ====== 버튼 컴포넌트의 버튼 유형 및 눌림 상태에 대한 샘플 화면이다. 관련 속성으로 button_type, push_state가 있다. 관련 API로 getbuttontype, getstatuspush, setstatuspush, togglestatuspush가 있다. ===== 예시 ===== 템플릿 위치: /HTML5/COMPONENT/BUTTON/button_type 템플릿 파일 * [[xf5projecthome>template/screen/HTML5/COMPONENT/BUTTON/button_type.xml|button_type.xml]] * [[xf5projecthome>template/screen/HTML5/COMPONENT/BUTTON/button_type.js|button_type.js]] * [[xf5projecthome>template/template.html?xframe_screen_url=/HTML5/COMPONENT/BUTTON/button_type|새창으로 실행]] <php> echo '<html>'; echo '<iframe src="'; echo $conf['plugin']['xf5']['xf5projecthome'], 'template/template.html?'; echo 'xframe_screen_url=/HTML5/COMPONENT/BUTTON/button_type"'; echo ' class="_xf5_iframe"'; echo ' style="'; echo $conf['plugin']['xf5']['xf5iframestyle']; echo '">'; echo '</iframe>'; echo '</html>'; </php> ==== 화면 스크립트 ==== <sxh javascript> // "getbuttontype" 버튼 이벤트 function btn_getbuttontype_on_click(objInst) { // 버튼 타입을 구하여 필드에 표시 fld_buttontype.settext(btn_push.getbuttontype()); } //"getstatuspush/setstatuspush" 버튼 이벤트 function btn_statuspush_on_click(objInst) { //버튼 눌림 상태 기준 내부 데이터 값(true/false 속성값)을 반환 var is_push_state; is_push_state = btn_push.getstatuspush(); factory.consoleprint("before getstatuspush = " + is_push_state); // 토글 처리 btn_push.setstatuspush(!is_push_state); is_push_state = btn_push.getstatuspush(); factory.consoleprint("after getstatuspush = " + is_push_state); } // "togglestatuspush" 버튼 이벤트 function btn_togglestatuspush_on_click(objInst) { btn_push.togglestatuspush(); } </sxh> guide/component/button/button_type.txt 마지막으로 수정됨: 2023/09/11 16:06저자 127.0.0.1