Skip to content

Instantly share code, notes, and snippets.

@egoing
Last active April 10, 2022 11:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save egoing/0aa33c770fa5004466835ec81192fabf to your computer and use it in GitHub Desktop.
Save egoing/0aa33c770fa5004466835ec81192fabf to your computer and use it in GitHub Desktop.
자바스크립트 예제 - 말줄임표
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<style>
.collapse {
background-color:#ddd;
padding:0 5px;
cursor:pointer;
}
.expand{
display:none;
}
</style>
</head>
<body>
<div class="content">
JavaScript is <span class="collapse" onclick="
this.style.display = 'none';
this.parentNode.querySelector('.expand').style.display = 'inline';
">...</span><span class="expand">is a programming language that is one of the core technologies of the World Wide Web, alongside HTML and CSS.</span>
</div>
</body>
</html>
@egoing
Copy link
Author

egoing commented Apr 10, 2022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment