<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<style>
#text-button {
display:block;
cursor:pointer;
width: 160px;
text-align:center;
border: 1px solid #232323;
}
</style>
<title>Document</title>
</head>
<body>
<div id="text-button"><p id="text">あなたのことが好きです。結婚してください。</p></div>
<script>
document.getElementById("text-button").onclick = function() {
document.getElementById("text").innerHTML = "すみません。私はあんまり。";
};
</script>
</body>
</html>
More than 3 years have passed since last update.
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme