- jQuery 형식에 따라 폼 요소 선택
- jQuery 폼 요소 타입으로 찾기
- jQuery input 형식으로 선택
1 예제 코드[ | ]
html
Copy
<script type="text/javascript" src="https://code.jquery.com/jquery-3.5.1.js"></script>
<script>
$(function() {
$(":text").each(function() {
$(this).prop("text");
})
});
</script>
<input type='text' value='배'/>
<input type='text' value='바나나' />
<input type='text' value='멜론' />
- → text형식의 값 "배", "바나나", "멜론"이 차례로 출력된다.
2 같이 보기[ | ]
편집자 Jmnote 210.216.14.100 10.178.0.25 Jmnote bot
로그인하시면 댓글을 쓸 수 있습니다.