나는 2 개의 표시를 포함하고 있습니다. 퍼가기에는 pdf에 연결이 있습니다 :다시로드하지 않고 표시/숨기기
<div id="container" class="text-center">
<embed src="www.example.com/pdf1.pdf" width="550" height="800" type='application/pdf' id="mypdf1">
<embed src="www.example.com/pdf2.pdf" width="550" height="800" type='application/pdf' id="mypdf2">
</div>
나는 또한 2 개의 단추가 있고, 1 개는 묻기를 보여주고 또 하나는 묻을 것을 숨길 수 있습니다. 이처럼 :
는<div class="button">
<button class="btn-info" onclick="hide('thePdf2')" type="button">HIDE</button>
</div>
<div class="button">
<button class="btn-info" onclick="show('thePdf2')" type="button">SHOW</button>
</div>
나는 퍼가기를 표시하고 숨길 다음과 같은 기능을 사용
<script>
function show(target) {
document.getElementById(target).style.display = 'block';
}
function hide(target) {
document.getElementById(target).style.display = 'none';
}
</script>
내 난 단지 보여주는 및 퍼가기 중 하나를 숨기고 오전, 내 문제는 이것이다 : Evertime는 내가 보여 pdf를 다시로드하고 pdf 페이지의 맨 위로 이동합니다. 필자가 보여줄 때마다 pdf를 새로 고침하고 싶지 않습니다. 이것을 어떻게 할 수 있습니까?
그 트릭을 했어, 정말 고마워! – arjwolf
당신을 진심으로 환영합니다! 다행 했어. –