코딩 노트/Node.js
[node js] 자바스크립트 페이지이동 & 뒤로 가기
리카르도K
2017. 6. 15. 12:30
*자바스크립트 뒤로가기 쿼리
<div align="center">
<button onclick="goBack()" class="btn btn-primary" style='color: white; background-color:rgb( 59, 89, 152);'>뒤로가기</button>
</div>
<script>
function goBack() {
window.history.back();
}
</script>
*서버에서 auth 객체를 view 에 던져서 존재하면 페이지를 보여주고
없으면 location.href로 바로 페이지 강제 이동
<% if(auth==null||auth==""||auth===null){ %>
<script>
location.href='https://000000.00000.00000';
</script>
<% } %>