반응형
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- APPEND
- AWS
- pds
- 비전공자
- list
- lombok
- 자바
- 정보처리기사
- regressor
- crawling
- dataframe
- springboot
- Req
- 웹앱
- ensemble
- 크롤링
- javascript
- SOUP
- sklearn
- 머신러닝
- 정보처리기사필기
- BS
- BeautifulSoup
- request
- 자바스크립트
- pandas
- 백준
- 정처기
- java
- Intellij
Archives
- Today
- Total
No sweet without sweat
콘텐츠 탐색 선택자(contain,contents,has,not,end) 본문
728x90
반응형
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<script src="JS/jquery.js"></script>
<script>
$(function(){
$("#inner_1 p:contains(내용1)")
.css({
"background-color":"#ff0"
});
$("#inner_1 p:has(strong)")
.css({
"background-color":"#0ff"
});
$("#outer_wrap").contents()
.css({
"border":"1px dashed #00f"
});
$("#inner_2 p").not(":first")
.css({
"background-color":"#0f0"
});
$("#inner_2 p").eq(2).end()
.css({
"color" :"#f00"
});
});
</script>
</head>
<body>
<div id ="outer_wrap">
<h1>콘텐츠 탐색 선택자</h1>
<section id ="inner_1">
<h1>contains(),contents(),has()</h1>
<p>
<span>내용1</span>
</p>
<p>
<strong>내용2</strong>
</p>
<p>
<span>내용3</span>
</p>
</section>
<section id="inner_2">
<h1>not(),end()</h1>
<p>내용4</p>
<p>내용5</p>
<p>내용6</p>
</section>
</div>
</body>
</html>
728x90
반응형
Comments