1125 일지

Yesol Lee·2022년 11월 25일
0

개발일지 - 2022

목록 보기
172/187

프로젝트

개발지원

  • 문제은행, 설문 데이터 삽입
  • 새로운 과정 데이터 생성 + 시험, 과제, 토론, 설문 설정

개발

html 링크 연결

웹페이지에서 버튼이나 글자를 클릭하면 다른 화면으로 이동하거나 새 탭에 링크를 여는 기능이 필요할 때가 있다. 찾아보니 <a>태그나 <button>를 사용할 때 방법이 약간 달라서 정리해둔다.
How to Add an HTML Button that Acts Like a Link

1. html에서 다른 링크로 이동

<a href="https://velog.io/@lee_yesol421">내 velog</a>

<button onclick="window.location.href='https://velog.io/@lee_yesol421';" type="button">내 velog</button>

2. html에서 새 창에 다른 링크 열기

<a href="https://velog.io/@lee_yesol421" target="_blank">내 velog</a>

<form action="https://velog.io/@lee_yesol421" method="get" target="_blank">
    <button type="submit" >내 velog</button>
</form>
profile
문서화를 좋아하는 개발자

0개의 댓글