:password 예제 :password 정의 :password 구문
:password 예제 - type="password"인 input 요소 선택.
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> <script> $(document).ready(function(){ $(":password").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> 결과보기
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
$(":password").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>
결과보기
:password 정의
type="password"인 input 요소 선택.
:password 구문
$(":password")