1. 현재페이지에 부를때
<button onclick="location.href='address'">button</button>
2. 새 창에 열때
<button onclick="window.open('address')">button</button>
3. 팝업으로 열기 (주소,팝업창이름,옵션)
<button onclick="window.open('address','window_name','width=430,height=500,location=no,status=no,scrollbars=yes');">button</button>
4. 상위 프레임에 부를때
<button onclick="parent.location.href='address'">button</button>
5. 프레임 지정 링크
<button onclick="타켓명.location.href='address'">button</button>
'코딩 공부 > HTML' 카테고리의 다른 글
css 로 네온사인 효과 주기 (0) | 2022.05.18 |
---|---|
모달 스크롤할 때 바디 스크롤 방지 (0) | 2022.03.31 |
[css] - 이미지 잘리지 않게 css 사용 (0) | 2022.02.22 |
html - select 박스에서 placeholder 쓰기 (0) | 2022.01.12 |
[CSS] 텍스트 뒤에 이미지 따라다니게 하기 - select 박스 (0) | 2022.01.11 |