*자바스크립트 뒤로가기 쿼리
<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>
<% } %>
'코딩 노트 > Node.js' 카테고리의 다른 글
| [node js] mysql 연동해서 파일 전송 (4) | 2018.06.13 |
|---|---|
| [node js] mysql 게시판 구현 (1482) | 2018.06.12 |
| [node js] 자바스크립트 동적구현&함수에 값넣고 호출 할때 에러해결 (0) | 2017.06.14 |
| [nodejs] 이미지 프로젝트에 사용 (0) | 2017.06.07 |
| [node js] 게시판 글 클릭 후 뒤로가기하면 조회수 초기화 문제 (0) | 2017.06.06 |