목적 : 버튼을 클릭하면 Hello world 라는 글자가 World Hello 로 바뀐다
+ 바뀔 때 지정해둔 Style이 적용된다.
사용한 명령어: getElementById / setAttruibute(' ', ' ') / document.innerHTML = ' '
------------------------------------------------------------------------
<html>
<head>
<meta charset="UTF-8"/>
<style>
.active{
color:red;
font-size:100px;
}
</style>
</head>
<body>
<div id="target">Hello world!</div>
<button onclick="document.getElementById('target').setAttribute('class','active')">색깔</button>
<br>
<button onclick="document.getElementById('target').innerHTML = 'World Hello'">순서 치환</button>
</body>
</html>
-----------------------------------------------------------------------------