<!-- html(), text() 함수 테스트 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="../jquery-1.7.2.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
var divHtml = $("#dataLayer").html();
var divTxt = $("#dataLayer").text();
alert(divHtml);
alert(divTxt);
$("#txtBtn").click(function(){
$("#showLayer").text("<font size=4 color=blue><b>점심 맛나게 드세요</b></font>");//조회하기
});
$("#htmlBtn").click(function(){
$("#showLayer").html("<font size=4 color=blue><b>점심 맛나게 드세요</b></font>");//값넣기
})
})
</script>
<title>Insert title here</title>
</head>
<body>
<div id="dataLayer">
<font size=2 color="#FFDD33">안녕하세요</font>
<b>반갑습니다.</b>
</div>
<div id="showLayer"></div>
<input type="button" value="text입력" id="txtBtn">
<input type="button" value="html입력" id="htmlBtn">
</body>
</html>