PhoneLookup / index.html
Jayaviji's picture
Update index.html
032f350 verified
Raw History Blame Contribute Delete
2.77 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Phone Lookup Demo</title>
<style>
* {
box-sizing: border-box;
}
body {
margin: 0;
min-height: 100vh;
display: flex;
justify-content: center;
align-items: center;
font-family: Arial, sans-serif;
background: #f5f7fb;
}
.container {
width: 90%;
max-width: 450px;
padding: 30px;
background: white;
border-radius: 16px;
box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
text-align: center;
}
h1 {
margin-bottom: 8px;
}
p {
color: #666;
}
input {
width: 100%;
padding: 14px;
margin-top: 15px;
border: 1px solid #ccc;
border-radius: 8px;
font-size: 16px;
}
button {
width: 100%;
padding: 14px;
margin-top: 12px;
border: none;
border-radius: 8px;
background: #2563eb;
color: white;
font-size: 16px;
cursor: pointer;
}
button:hover {
background: #1d4ed8;
}
#result {
margin-top: 20px;
padding: 15px;
border-radius: 8px;
background: #f1f5f9;
min-height: 45px;
}
.note {
margin-top: 20px;
font-size: 12px;
color: #888;
}
</style>
</head>
<body>
<div class="container">
<h1>📱 Phone Lookup</h1>
<p>Authorized contact database demo</p>
<input
type="tel"
id="phone"
placeholder="Enter phone number"
autocomplete="off"
>
<button onclick="lookup()">Search</button>
<div id="result">
Enter a number to search.
</div>
<div class="note">
Demo only — uses authorized sample records.
</div>
</div>
<script>
// Sample records only.
// Replace these with your own authorized data.
const records = {
"1234567890": {
name: "Demo User",
address: "Example Address, Chennai"
},
"9876543210": {
name: "Test User",
address: "Example Address, Coimbatore"
}
};
function lookup() {
const phone = document.getElementById("phone").value.trim();
const result = document.getElementById("result");
if (phone === "") {
result.textContent = "Please enter a phone number.";
return;
}
const record = records[phone];
if (record) {
result.innerHTML =
"<strong>Name:</strong> " + record.name +
"<br><br>" +
"<strong>Address:</strong> " + record.address;
} else {
result.textContent = "No authorized record found.";
}
}
</script>
</body>
</html>