JQuery Get

이소연's avatar
Aug 05, 2024
JQuery Get

JQuery Get

 

1)text() : 선택된 요소의 text를 설정/반환

글자를 가져옴.
notion image
notion image
 

2) html() : 선택된 요소(html 마크업 포함)의 내용을 설정/반환

html 내용을 가져옴
notion image
notion image
 
 

3) val() : 폼 필드의 값을 설정/반환

값을 반환
notion image
notion image

4) attr(): 속성 가져오기

href의 속성을 가져옴
notion image
notion image
 
Share article

Coding's note