'Selector'에 해당되는 글 12건

  1. 2010.12.30 Attribute Contains Selector [name*="value"]
속성값에 해당하는 단어를 찾을 때 사용하며 value값이 포함되어 있는 모든 것을 찾는다.
value 의 쌍따옴표는 필수다.

사용예
<!DOCTYPE html>
<html>
<head>
  <script src="http://code.jquery.com/jquery-1.4.4.js"></script>
</head>
<body>
  <input name="man-news" />

  <input name="milkman" />
  <input name="letterman2" />
  <input name="newmilk" />
<script>$('input[name*="man"]').val('has man in it!');</script>

</body>
</html>
위 예제는 input 태그의 속성값으로 man이라는 단어가 들어가 있는 모든 input 태그의 value를 지정한다.

Posted by IT

블로그 이미지
IT

공지사항

Yesterday
Today
Total

달력

 « |  » 2025.5
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31

최근에 올라온 글

최근에 달린 댓글

최근에 받은 트랙백

글 보관함