jquery2

조수경·2021년 11월 22일
0

HTML

목록 보기
67/96
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
<link rel = "stylesheet" href = "/jqpro/css/mystyle.css" type="text/css">
<script src="/jqpro/js/jquery-3.6.0.min.js"></script>
</head>
<body>

<div class = "box">
  script의 위치를 body밑에 코딩<br>
  html요소에 직접 접근 가능하다<br>
  window.onload=function(){}문장이 없어도 실행됨 <br>
  $(document).ready(function(){})문장이 없어도 실행됨<br>
   <br>
  <button type = "button">확인</button>
  <div id = "result1"></div>
</div>

</body>

<script>
  $('#result1').css('background-color', 'green');
</script>

</html>
profile
신입 개발자 입니다!!!

0개의 댓글