This is an HTML page that allows users to check the validity of an IMEI number. Here's a description of the page:

Title: IMEI Checker
Functionality:
  • Users can enter an IMEI number in the input field.
  • When the "Check" button is clicked, the page sends a request to the IMEI.info API to verify the IMEI number.
  • If the IMEI number is valid, the page displays a success message.
  • If the IMEI number is invalid, the page displays an error message.
  • The page also includes a "Visit my blog" button that redirects users to a specified blog URL.
  • The page includes a "Clear" button that clears the input field and result message.
Design:
  • The page has a simple and clean design with a white background and a grayish-blue color scheme.
  • The input field and buttons have a rounded corner design.
  • The result message is displayed in a bold font.
Script:
  • The page uses JavaScript to handle the form submission and API request.
  • The script sends a POST request to the IMEI.info API with the IMEI number and API key.
  • The script then parses the API response and displays the result message accordingly.



IMEI Checker

IMEI Checker

HTML

<!DOCTYPE html>

<html>

<head>

<title>IMEI Checker</title>

<link rel="stylesheet" href="style.css">

</head>

<body>

<h1>IMEI Checker</h1>

<input type="text" id="imei" placeholder="Enter IMEI Number">

<button id="check">Check</button>

<div id="result"></div>

<button id="blog">Visit my blog</button>

<button id="clear">Clear</button>


<script src="script.js"></script>

</body>

</html>


Css


body {

font-family: Arial, sans-serif;

}


#imei {

width: 300px;

height: 30px;

font-size: 18px;

padding: 10px;

margin-bottom: 20px;

}


#check {

background-color: #4CAF50;

color: #fff;

padding: 10px 20px;

border: none;

border-radius: 5px;

cursor: pointer;

}


#check:hover {

background-color: #3e8e41;

}


#result {

margin-top: 20px;

font-size: 24px;

font-weight: bold;

}


#blog {

background-color: #2196F3;

color: #fff;

padding: 10px 20px;

border: none;

border-radius: 5px;

cursor: pointer;

margin-top: 20px;

}


#blog:hover {

background-color: #0b7dda;

}


#clear {

background-color: #f44336;

color: #fff;

padding: 10px 20px;

border: none;

border-radius: 5px;

cursor: pointer;

margin-top: 20px;

}


#clear:hover {

background-color: #e91e63;

}


Js

document.getElementById('check').addEventListener('click', function() {

var imei = document.getElementById('imei').value;

if (imei.length !== 15) {

document.getElementById('result').innerHTML = 'Invalid IMEI Number';

return;

}


fetch('https://api.imei.info/api/imei/check', {

method: 'POST',

headers: {

'Content-Type': 'application/json',

'Authorization': 'Bearer YOUR_API_KEY'

},

body: JSON.stringify({ imei: imei })

})

.then(response => response.json())

.then(data => {

if (data.status === 'success') {

document.getElementById('result').innerHTML = 'IMEI is valid';

} else {

document.getElementById('result').innerHTML = 'IMEI is invalid';

}

})

.catch(error => {

document.getElementById('result').innerHTML = 'Error checking IMEI';

});

});


document.getElementById('blog').addEventListener('click', function() {

window.location.href = 'https://codecrafti.blogspot.com'; // Replace with your blog URL

});


document.getElementById('clear').addEventListener('click', function() {

document.getElementById('imei').value = '';

document.getElementById('result').innerHTML = '';

});


Live demo