제이쿼리 Attribute Starts With Selector [name^=”value”]
제이쿼리 Attribute Starts With Selector [name^=”value”]
설명 : 주어진 문자열로 정확하게 시작하는 값으로 지정된 속성을 갖는 요소를 선택합니다.
jQuery ( "[attribute ^ = 'value']")
attribute : 속성 이름.
value : 속성 값. 유효한 식별자 또는 따옴표 붙은 문자열이 될 수 있습니다 .
이 선택기는 체계적인 요소 ID로 HTML을 생성하는 서버 측 프레임 워크에서 생성 된 페이지의 요소를 식별하는 데 유용 할 수 있습니다. 그러나 클래스 선택기를 사용하는 것보다 느려질 수 있으므로 가능한 경우 클래스를 활용하여 유사한 요소를 그룹화하십시오.
예:
속성 이름이 'news'로 시작하고 텍스트를 입력 한 모든 입력을 찾습니다.
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>attributeStartsWith demo</title>
<script src="https://code.jquery.com/jquery-1.10.2.js"></script>
</head>
<body>
<input name="newsletter">
<input name="milkman">
<input name="newsboy">
<script>
$( "input[name^='news']" ).val( "news here!" );
</script>
</body>
</html>
게시판 목록
개발자팁
개발과 관련된 유용한 정보를 공유하세요.
질문은 QA에서 해주시기 바랍니다.
질문은 QA에서 해주시기 바랍니다.
| 번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|---|
| 4556 | jQuery |
프로그래머7
|
8년 전 | 1690 | |
| 4555 | jQuery |
프로그래머7
|
8년 전 | 1606 | |
| 4554 | jQuery |
프로그래머7
|
8년 전 | 1661 | |
| 4553 | jQuery |
프로그래머7
|
8년 전 | 2040 | |
| 4552 | PHP | 8년 전 | 1879 | ||
| 4551 | PHP | 8년 전 | 1464 | ||
| 4550 | PHP | 8년 전 | 1706 | ||
| 4549 | jQuery |
프로그래머7
|
8년 전 | 2743 | |
| 4548 | jQuery |
프로그래머7
|
8년 전 | 1439 | |
| 4547 | jQuery |
프로그래머7
|
8년 전 | 1366 | |
| 4546 | jQuery |
프로그래머7
|
8년 전 | 1683 | |
| 4545 | jQuery |
프로그래머7
|
8년 전 | 1709 | |
| 4544 | jQuery |
프로그래머7
|
8년 전 | 1862 | |
| 4543 | jQuery |
프로그래머7
|
8년 전 | 1651 | |
| 4542 | jQuery |
프로그래머7
|
8년 전 | 1583 | |
| 4541 | jQuery |
프로그래머7
|
8년 전 | 1632 | |
| 4540 | jQuery |
프로그래머7
|
8년 전 | 1665 | |
| 4539 | jQuery |
프로그래머7
|
8년 전 | 1862 | |
| 4538 | jQuery |
프로그래머7
|
8년 전 | 1535 | |
| 4537 | jQuery |
프로그래머7
|
8년 전 | 1695 | |
| 4536 | jQuery |
프로그래머7
|
8년 전 | 1933 | |
| 4535 | jQuery |
프로그래머7
|
8년 전 | 1519 | |
| 4534 | jQuery |
프로그래머7
|
8년 전 | 1854 | |
| 4533 | jQuery |
프로그래머7
|
8년 전 | 2342 | |
| 4532 | jQuery |
프로그래머7
|
8년 전 | 1913 | |
| 4531 | PHP |
|
8년 전 | 3706 | |
| 4530 | jQuery |
프로그래머7
|
8년 전 | 1799 | |
| 4529 | jQuery |
프로그래머7
|
8년 전 | 1898 | |
| 4528 | jQuery |
프로그래머7
|
8년 전 | 1694 | |
| 4527 | jQuery |
|
8년 전 | 2695 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기