-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdisplay_text.html
105 lines (97 loc) · 3.28 KB
/
display_text.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>House Renting</title>
<style>
body {
background: linear-gradient(to right, #00c6ff, #0072ff);
font-family: Arial, sans-serif;
color: white;
text-align: center;
padding: 20px;
}
h1 {
margin: 20px 0;
}
.images {
display: flex;
justify-content: center;
margin: 20px 0;
}
.image-box {
border: 2px solid white;
width: 150px;
height: 150px;
margin: 0 10px;
}
form {
margin: 20px 0;
}
input {
margin: 10px 0;
padding: 10px;
border: none;
border-radius: 5px;
}
button {
padding: 10px 20px;
background-color: #0072ff;
border: none;
border-radius: 5px;
color: white;
cursor: pointer;
}
</style>
</head>
<body>
<h1>House Renting</h1>
<p>Your ideal home is now just a few clicks away. Experience stress-free renting with our easy-to-use platform and exceptional customer service.</p>
<div class="images">
<div class="image-box">(pictures)</div>
<div class="image-box">(pictures)</div>
<div class="image-box">(pictures)</div>
<div class="image-box">(pictures)</div>
</div>
<form id="rental-form">
<input type="text" id="phone" placeholder="Phone number" required>
<input type="number" id="age" placeholder="Age" required>
<input type="email" id="email" placeholder="E-mail" required>
<button type="submit">Yes, I'm interested</button>
</form>
<script>
document.getElementById('rental-form').addEventListener('submit', function(event) {
event.preventDefault();
const phone = document.getElementById('phone').value;
const age = document.getElementById('age').value;
const email = document.getElementById('email').value;
const data = {
phone: phone,
age: age,
email: email
};
// Send data to your email (replace with your email sending service)
fetch('https://example.com/send-email', { // Replace with your email sending endpoint
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify(data)
})
.then(response => {
if (response.ok) {
alert('Your information has been sent!');
document.getElementById('rental-form').reset();
} else {
alert('There was a problem sending your information.');
}
})
.catch(error => {
console.error('Error:', error);
alert('There was a problem sending your information.');
});
});
</script>
</body>
</html>