본문 바로가기
study_front/HTML

<a> 태그나 <button>이 아니어도 클릭 가능한 것처럼 커서 보여주기

by developer_j 2024. 1. 30.
728x90
반응형

a태그나 button 이 아니어도 클릭 가능한 것처럼 커서 보여주기

 

style 에 cursor:pointer 삽입

 

<style>
	table td{cursor:pointer}
</style>

<div>
	<table>
		<thead>
			<tr>
				<th>문의유형</th>
				<th>제목</th>
				<th>작성자</th>
			</tr>
		</thead>
		<tbody>
			<tr>
				<td>1</td>
				<td>title1</td>
				<td>user1</td>
			</tr>
			<tr>
				<td>2</td>
				<td>title2</td>
				<td>user1</td>
			</tr>
		</tbody>
	</table>
</div>

 

이렇게 하고 onclick 이벤트를 걸어 상세화면으로 이동 가능하도록 구현했다.

728x90
반응형