일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- 구글 안드로이드 개발
- sky 시리우스폰
- SKY 시리우스
- android
- 안드로이드 2.0 개발
- 스카이 안드로이드폰 시리우스
- 안드로이드
- 아이폰 바탕화면
- 안드로이드 개발 2.0
- Form Stuff
- 구글안드로이드
- 스카이 안드로이드폰 시리우스 K양 동영상
- 안드로이드폰
- 하루한마디영어
- 하루 한마디 영어
- 안드로이드2.0
- 구글 안드로이드
- MapView
- 안드로이드 개발 강좌
- 안드로이드 배경화면
- 안드로이드 개발
- 안드로이드 바탕화면
- 인기있는 블로그 만들기
- 스마트폰 배경화면
- 안드로이드 개발 2.0 강좌
- objective-c
- 아이폰 배경화면
- 안드로이드2.0개발
- 안드로이드개발
- 영어
- Today
- Total
moozi
6/9 jquery01.html 본문
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Jquery</title>
<!-- jquery사용 ---------------------------------------------->
<script src="js/jquery-1.12.4.min.js" type="text/javascript"></script>
<!-- jquery CDN 사용 -------------------------------------->
<!-- <script src="http://code.jquery.com/jquery-1.12.4.min.js"></script>-->
<style type="text/css">
.bg1{
background-color: crimson;
}
</style>
<script>
$(document).ready(function(){
//document.write("jquery");
$("h1").css("color","olive");
//document.getElementsByTagName("h2")[0].style.color="olive";
//document.querySelector("h2").style.color="olive";
$("#header1").css("color","aqua");
$(".header2").css("background-color","red");
var links=[{name:"hanbit",url:"http://hanb.co.kr"},
{name:"naver",url:"http://www.naver.com"}];//객체배열
var output="";
$.each(links,function(index,item){
output+="<a href='"+item.url+"'>"+item.name+"</a><br>";
$("#div1").html(output);
//document.body.innerHTML+=output;
});//index:배열인덱스.item:배열요소
$("p").each(function(index,item){
$(item).css("background-color","orange");
});
$("#btn1").click(function(){
$("#header3").addClass("bg1");
});
});
</script>
</head>
<body>
<h1>Jquery</h1>
<h2>Jquery</h2>
<h1 id="header1">JQuery</h1>
<h1 class="header2">JQuery</h1>
<div id="div1"></div>
<h1 id="header3">JQuery</h1>
<input type="button" id="btn1" value="클릭1"><br>
<p>JQuery</p>
<p>JQuery</p>
<p>JQuery</p>
<p>JQuery</p>
</body>
</html>
'TIS_2016 > HTML5_2기' 카테고리의 다른 글
6/9 예제파일 (0) | 2016.06.09 |
---|---|
jquery연습문제01 (0) | 2016.06.09 |
6/9 javascriptBasic2 (0) | 2016.06.09 |
6/9 jquer01.html (0) | 2016.06.09 |
javascript 연습문제05 풀이 (0) | 2016.06.09 |