제 이름을 알고싶으면 아래의 확인 버튼을 클릭하세요.
<button type="button" onclick="myFunction()">확인</button>
<button type="button" onclick="myClear()">지우기</button>
function myFunction() {
document.getElementById("name").innerHTML = "양혜정";
}
function myClear(){
document.getElementById("name").innerHTML = "";
}
// clear 는 명령어이므로 함수명으로 사용이 불가능하다.
@charset "UTF-8";
span#name{
font-size: 16pt;
color: navy;
font-weight: bold;
font-style: italic;
}