내 사이트에서 Fullcalendar를 사용하고 있으며 인쇄 할 단추가 있습니다. 나는 다음과 같이하고있다 :fullcalendar를 인쇄 할 때 단추를 숨기기
function print_calendar() {
$('#calendar').css('width', '6.5in');
$('.fc-content .fc-state-highlight').css('background', '#ccc');
$('#calendar').fullCalendar('render');
bdhtml = window.document.body.innerHTML;
sprnstr = "<!--startprint-->";
eprnstr = "<!--endprint-->";
prnhtml = bdhtml.substr(bdhtml.indexOf(sprnstr) + 17);
prnhtml = prnhtml.substring(0, prnhtml.indexOf(eprnstr));
window.document.body.innerHTML = prnhtml;
window.print();
나는 또한 이전 달, 다음 달, 오늘, 그리고 달 버튼을 숨길 수 있기를 바란다. 어떻게 자바 스크립트를 통해이 작업을 수행 할 수 있습니까? 나는 fullcalendar 코드에서 그들을 변경하고 싶지는 않습니다. 인쇄하기 전에 그것들을 감추고 나머지는 표시하도록하십시오.
Java와 어떤 관련이 있습니까? 물론 자바와 자바 스크립트는 완전히 다른 두 언어입니다. 햄은 햄스터와 비슷합니다. 자바 태그를 잃을 수도 있습니다. –
신경 쓰지 마라. bemace가 질문에서 Java 태그를 제거했다는 것을 알았다. –