-
글쓴이글
-
2022년 2월 5일 19:39 #26472
김재훈참가자<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<link rel="stylesheet" href="plz.css" />
<script
src="https://code.jquery.com/jquery-3.6.0.min.js"
integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4="
crossorigin="anonymous"
></script>
</head>
<body>
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no"
/><!-- Bootstrap CSS -->
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/bootstrap@4.6.1/dist/css/bootstrap.min.css"
integrity="sha384-zCbKRCUGaJDkqS1kPbPd7TveP5iyJE0EjAuZQTgFLD2ylzuqKfdKlfG/eSrtxUkn"
crossorigin="anonymous"
/>
<title>Hello, world!</title>
</head>
<body>
<div class="black-background">
<div class="white-background">
<p>로그인하세요</p>
</div>
</div><div class="jumbotron main-background">
<h1 class="display-4">Hello, world!</h1>
<p class="lead">
This is a simple hero unit, a simple jumbotron-style component for
calling extra attention to featured content or information.
</p>
<hr class="my-4" />
<p>
It uses utility classes for typography and spacing to space content
out within the larger container.
</p>
<a class="btn btn-primary btn-lg" href="#" role="button" id="버튼">
Log in
</a>
</div><script>
document
.getElementById("버튼")
.addEventListener('click', function () {
document.getElementsByClassName(
'black-background'
).style.display = 'block';
});
</script><script
src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.1/dist/js/bootstrap.bundle.min.js"
integrity="sha384-fQybjgWLrvvRgtW6bFlB7jaZrFsaBXjsOMm/tB9LTS58ONXgqbR9W8oWht/amnpF"
crossorigin="anonymous"
></script>
</body>
</html>
</body>
</html>---------------------------------------------------------------------------------------
TypeError: Cannot set properties of undefined (setting 'display')
at HTMLAnchorElement.<anonymous>도저히 왜 뜨는지 모르겠습니다..
-
글쓴이글
- 답변은 로그인 후 가능합니다.