Email Box With Button Blogger Code







<!DOCTYPE html>

<html>

<head>

<title>Email Box and Button</title>

<style>

body {

background-color: #f0f0f0;

text-align: center;

font-family: Arial, sans-serif;

}




h2 {

color: #333;

}




#emailInput {

width: 250px;

height: 40px;

border: 1px solid #ccc;

border-radius: 5px;

padding: 10px;

font-size: 16px;

margin: 10px;

}




#openWebsiteButton {

background-color: #007BFF;

color: white;

border: none;

border-radius: 5px;

padding: 10px 20px;

font-size: 18px;

cursor: pointer;

transition: background-color 0.3s;

}




#openWebsiteButton:hover {

background-color: #0056b3;

}

</style>

</head>

<body>

<h2>Enter your email:</h2>

<input type="email" id="emailInput" placeholder="Your email">

<button id="openWebsiteButton">Enter</button>




<script>

var emailInput = document.getElementById("emailInput");

var openWebsiteButton = document.getElementById("openWebsiteButton");




openWebsiteButton.addEventListener("click", function() {

var email = emailInput.value;

if (email.trim() !== "") {

var websiteURL = "DIRECT LINK";

window.open(websiteURL, "_blank");

} else {

alert("Please enter your email before claim the product.");

}

});

</script>

</body>



</html>

Post a Comment

Previous Post Next Post