prac.html
1.25 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
<!DOCTYPE html>
<html lang="ko">
<head>
<meta charset="utf-8">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<title>test</title>
</head>
<body>
<script type="text/javascript">
$(document).ready(function() {
$("div div").hide();
$(".button1").click(function() {
$(".div2").show();
});
$(".button2").dblclick(function() {
//$("a[target=_blank]").text("12345");
$("a[target=_blank]").html("<b>12345</b>");
alert($("a[target=_blank]").attr("href"));
});
$("div div").click(function() {
$(this).hide();
});
$("#input1").focus(function() {
$(this).css("background-color", "#cccccc");
});
$("#input1").blur(function() {
$(this).css("background-color", "#ffffff");
});
});
</script>
<div class="div1">
이거 보이니
<div class="div2">
이것도 보이닝?
</div>
</div>
<a href="#" target="_self">123</a>
<a href="#" target="_blank">1234</a>
<button type="button" name="button" class="button1">showButton</button>
<button type="button" name="button" class="button2">doubleClick</button>
<br> name:
<input type="text" name="" id="input1" value="">
</body>
</html>