All Rounder Tools Blogger-Best blog for blogger: Text to HEX converter Tool with colorful styling and all its features use any free library

Friday, October 4, 2024

Text to HEX converter Tool with colorful styling and all its features use any free library

 

Text to HEX Converter

Text to HEX Converter

HEX Output:

* { box-sizing: border-box; } body { font-family: Arial, sans-serif; background-color: #f0f4f8; margin: 0; padding: 20px; display: flex; justify-content: center; align-items: center; height: 100vh; } .container { background: white; border-radius: 10px; box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); padding: 20px; width: 400px; } h1 { color: #3498db; text-align: center; } textarea { width: 100%; height: 100px; padding: 10px; border: 1px solid #ddd; border-radius: 5px; font-size: 16px; } button { width: 100%; padding: 10px; background-color: #3498db; color: white; border: none; border-radius: 5px; font-size: 16px; cursor: pointer; transition: background-color 0.3s; } button:hover { background-color: #2980b9; } .output { margin-top: 20px; padding: 10px; border: 1px solid #ddd; border-radius: 5px; background-color: #f9f9f9; font-family: monospace; word-wrap: break-word; } document.getElementById('convertButton').addEventListener('click', function() { const inputText = document.getElementById('inputText').value; const hexOutput = document.getElementById('hexOutput'); if (inputText.trim() === "") { hexOutput.textContent = "Please enter some text to convert."; return; } // Convert each character to HEX let hexString = ''; for (let i = 0; i < inputText.length; i++) { hexString += inputText.charCodeAt(i).toString(16).padStart(2, '0') + ' '; } hexOutput.textContent = hexString.trim(); });

No comments:

Post a Comment

Supreme Court Reduces Mandatory Three-Year Legal Practice to One Year for Entry-Level Judicial Examination

The Supreme Court of India has recently brought a significant change in the eligibility requirements for entry-level judicial service examin...