Case Converter Tool:
Here is the complete code of the Case Converter tool implemented in HTML, CSS and JavaScript. This tool allows users to convert text between different letter cases like uppercase, lowercase, title case and sentence case. It has a colorful style and responsive design.
Case Converter
Converted Text:
Features of Case Converter Tool:
- Text Input: Allows the user to input text.
- Convert to Uppercase Button: Converts the input text to uppercase.
- Convert to Lowercase Button: Converts the input text to lowercase.
- Convert to Title Case Button: Converts the input text to title case.
- Result Display: Displays the converted text.
How it Works:
- When the user clicks the "Convert to Uppercase" button, the ConvertToUpperCase() function is called. This function converts the input text to uppercase using the toUpperCase() method.
- Similarly, when the user clicks the "Convert to Lowercase" button, the ConvertToLowerCase() function is called. This function converts the input text to lowercase using the toLowerCase() method.
- When the user clicks the "Convert to Title Case" button, the ConvertToTitleCase() function is called. This function converts input text to title case by using a regular expression to capitalize the first letter of each word.
- The changed text is then displayed in the results section.
Post a Comment
0Comments