Coding 1
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Yes or No</title>
<style>
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background-color: lightpink;
}
.container {
text-align: center;
}
h1 {
color: #333;
}
h2 {
color: #666;
}
img {
width: 200px;
height: auto;
margin-top: 20px;
}
.hidden {
display: none;
}
#yesButton, #noButton{
background: white;
padding:8px 16px;
border:none;
border-radius:5px;
}
</style>
</head>
<body>
<div class="container">
<h1>Do you love me?😊</h1>
<h2>Please say yes!</h2>
<button id="yesButton" >Yes</button>
<button id="noButton">No</button>
<img id="image"
src="[Link]
Gp3ZG13ZGc3MDh3aHdkMzFuZiZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/
c76IJLufpNwSULPk77/[Link]" alt="Placeholder Image">
</div>
<script>
let clickCount = 0;
const yesButton = [Link]('yesButton');
const noButton = [Link]('noButton');
const heading = [Link]('h1');
const subheading = [Link]('h2');
const image = [Link]('image');
const imageUrls = [
'[Link]
mIzZ3IyY2oxaGczZTZwbSZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/gDfteqLchLcRTtjAD7/
[Link]',
'[Link]
WM1ZWdpbXhtaWFobTRjOSZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/M90mJvfWfd5mbUuULX/
[Link]',
'[Link]
3F3Ym92bzFnN3RycHE5bSZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/eiRpSPB8OSGVcbkOIJ/
[Link]',
'[Link]
DB0Z2Njd2xxMjN3MXJoMSZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/3o6gDZ9unSrDk3EuR2/
[Link]',
'[Link]
DF3eDR1eGJ1N3YweWgyYyZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/9X8UlqKhaSPz4n7BkW/
[Link]',
];
[Link]('click', () => {
clickCount++;
if (clickCount < 5) {
[Link] = "Soch lo acche se?";
[Link] = `Click "yes".`;
[Link] = imageUrls[clickCount ];
}
if (clickCount === 4) {
[Link] = "How about now?";
[Link] = `Please click "Yes" now.`;
[Link] = "none";
[Link] = "inline-block";
}
});
[Link]('click', () => {
[Link] = " Hehe I knew it!";
[Link] = "I love you";
[Link] =
"[Link]
WVzdmE3bzhxZWppaWN2OCZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/bA5cblwksWXDOwSzUI/
[Link]";
[Link] = true;
[Link] = true;
[Link] = "none";
[Link] = "none";
});
</script>
</body>
</html>
Coding 2
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Yes or No</title>
<style>
/* Optional styling */
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
background-color: lightpink;
flex-direction:column;
}
button {
padding: 10px 20px;
margin: 10px;
font-size: 16px;
cursor: pointer;
}
#heading {
font-size: 24px;
margin-top: 20px;
}
#image {
max-width: 150px;
height: auto;
margin-top: 20px;
}
#yesButton, #noButton{
background: white;
padding:8px 16px;
border:none;
border-radius:5px;
}
</style>
</head>
<body>
<h1 id="heading">Do you Love me?😊</h1>
<img id="image"
src="[Link]
G9vYnhyMXV3aDM0MWZ3OHRoNCZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/
c76IJLufpNwSULPk77/[Link]" alt="Placeholder Image">
<div>
<button id="yesButton">Yes</button>
<button id="noButton" onmouseover="moveButton()">No</button> </div>
<!-- Optional JavaScript for button functionality -->
<script>
const yesButton = [Link]('yesButton');
const noButton = [Link]('noButton');
const heading = [Link]('heading');
const image = [Link]('image');
function moveButton() {
const newX = [Link]([Link]() * ([Link] -
[Link]));
const newY = [Link]([Link]() * ([Link] -
[Link]));
[Link] = 'absolute';
[Link] = newX + 'px';
[Link] = newY + 'px';
}
[Link]('click', () => {
[Link] = "Hehe, I knew it!😊";
[Link] =
"[Link]
3FwMmt2c3E1bDQyYnA2dCZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/bA5cblwksWXDOwSzUI/
[Link]";
[Link] = "none";
[Link] = "none";// Change image source if desired
});
[Link]('click', () => {
[Link] = "Sorry that you didn't like the image!";
[Link] = "[Link] // Reset image source if
desired
});
</script>
</body>
</html>