목차
- :text 예제
- :text 정의
- :text 구문
:text 예제 - type="text"인 input 요소 배경색 변경.
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
$(":text").css("background-color", "yellow");
});
</script>
<form action="">
이름: <input type="text" name="name"><br>
비밀번호: <input type="password" name="password"><br>
<button type="button">가</button>
<input type="button" value="나"><br>
<input type="reset" value="reset">
<input type="submit" value="submit"><br>
</form>
결과보기
:text 정의
type="text"인 input 요소 선택.
:text 구문
$(":text")