티스토리 뷰
반응형
<!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 |
댓글
