티스토리 뷰

반응형

<!DOCTYPE html>

<html>

<head>

<meta charset="UTF-8">

<title>Insert title here</title>

<script type="text/javascript">

function check(){

console.log("html-이벤트핸들러 인라인방식 check");

}

//자바스크립트는 먼저안만들어짐(body밑으로넣으면됨)

/* document.getElementById("cancle").onclick=function(){

console.log("cancle");

}; //자바스크립트에서 */

function init(){

}

</script>

</head>

<body>

<button onclick="check()"> OK </button>

<button id="cancle"> Cancle </button>

<script type="text/javascript">

document.getElementById("cancle").onclick=function(){

console.log("cancle");

};

</script>

</body>

</html>

반응형

'note' 카테고리의 다른 글

보안 위협의 형태  (0) 2022.08.16
보안 요구 사항.  (0) 2022.08.16
골프 이븐 파(Even Par)  (0) 2022.08.14
골프 오버 파(Over Par)  (0) 2022.08.14
골프 칩샷(Chip Shot)  (0) 2022.08.14
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2026/05   »
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
글 보관함