iframe 에서 부모창 body width 체크후 iframe에 특정 class 지정하기 > 자료실

자료실

자료실

iframe 에서 부모창 body width 체크후 iframe에 특정 class 지정하기

페이지 정보

profile_image
작성자 최고관리자
댓글 0 조회 388회 작성일 23-03-28 18:22
작성일 23-03-28 18:22

본문

<script>

var parentDocument = window.parent.document;

var parentBodyWidth = parentDocument.querySelector('body').clientWidth; // 부모창 body witdh

if(parentBodyWidth > 950 > 0) {

	document.querySelector('body').className = 'body_smart_editor2_900';

	document.getElementById('btn_syntax_plugin_width_mod').style.display = 'none';

}

</script>


추천 0 비추천 0

  • 회사 :
  • 대표 :
  • 주소 :
  • 메일 : admin@mysample.com
  • 사업자 등록번호 :
Copyright © cginjs.com All rights reserved.
notice