google-site-verification: google722da71d349632d6.html Country code finder Tool Skip to main content

Interest for Development and Coding Tools

Country code finder Tool

Country Code Finder

Country Code Finder

body { font-family: Arial, sans-serif; background-color: #f0f0f0; display: flex; justify-content: center; align-items: center; height: 100vh; margin: 0; } .container { text-align: center; background-color: white; padding: 20px; border-radius: 8px; box-shadow: 0 4px 8px rgba(0,0,0,0.1); max-width: 400px; width: 100%; } h1 { color: #333; } .input-section { margin-bottom: 20px; text-align: left; } label { font-weight: bold; margin-bottom: 8px; display: block; } input[type="text"] { width: calc(100% - 90px); padding: 10px; border: 1px solid #ccc; border-radius: 4px; font-size: 16px; } button { padding: 10px 20px; background-color: #4CAF50; color: white; border: none; cursor: pointer; border-radius: 4px; margin-left: 10px; } button:hover { background-color: #45a049; } #output { text-align: left; max-width: 100%; overflow-x: auto; padding: 10px; background-color: #f9f9f9; border: 1px solid #ccc; border-radius: 4px; display: none; /* Hidden by default */ } const countryCodes = { "Afghanistan": "AF", "Albania": "AL", "Algeria": "DZ", "American Samoa": "AS", // Add more countries as needed }; function findCountry() { const input = document.getElementById('countryInput').value.trim(); const outputDiv = document.getElementById('output'); if (input === '') { outputDiv.style.display = 'none'; return; } let countryCode = countryCodes[input]; if (!countryCode) { // Check if input matches a country code countryCode = Object.keys(countryCodes).find(key => countryCodes[key] === input.toUpperCase()); } if (countryCode) { outputDiv.textContent = `Country Code for "${input}": ${countryCode}`; } else { outputDiv.textContent = `Country code not found for "${input}"`; } outputDiv.style.display = 'block'; }

Comments

Popular posts from this blog

Python for Data Analysis

Here's an HTML code snippet to showcase Analytics and Data Tools on your blog. This includes a title, a brief introduction, and a list of popular analytics tools with descriptions. ```html Analytics and Data Tools Top Analytics and Data Tools Discover essential tools for analyzing data and gaining insights to improve your decision-making. 1. Google Analytics Description: A powerful web analytics service that tracks and reports website traffic, providing insights into user behavior and engagement. 2. Tableau Description: A data visualization tool that helps users understand their data through interactive, shareable dashboards and reports. 3. Microsoft Power BI Description: A business analytics tool that provides interactive visualizations and business intelligence capabilities, allowing users to create reports and dashboa...

Interest for Development and Coding Tools

Here’s an HTML code snippet to showcase Development and Coding Tools on your blog. This includes a title, a brief introduction, and a list of popular development tools with descriptions. ```html Development and Coding Tools Top Development and Coding Tools Explore essential tools that can help streamline your coding and development processes. 1. GitHub Description: A platform for version control and collaboration, allowing developers to host, review, and manage code in repositories. 2. Visual Studio Code Description: A lightweight but powerful code editor that supports various programming languages and offers numerous extensions for enhanced functionality. 3. Docker Description: A platform that enables developers to automate the deployment of applications in lightweight, portable containers, ensuring consistency across envir...