To convert a string (text) to lowercase one can make use of javaScript toLowercase() function.
Let's see an example:<html>
<head>
<title>Convert text to lower case!</title>
</head>
<body>
<input type="text" style="width:300px;padding:6px" id="text"
placeholder="Enter text to convert to lower case"/>
<br/><br/>
<input type="button" value="Convert" onClick="convertToLovercase();"/>
<br/><br/>
<input type="text" style="width:300px;padding:6px" id="result"
placeholder="Result"/>
<script type="text/javascript">
function convertToLovercase() {
var data = document.getElementById("text").value;
var lowerCase = data.toLowerCase();
document.getElementById("result").value = lowerCase;
}
</script>
</body>
</html>
More Posts related to JavaScript,
- How to get UTC (GMT) time using JavaScript
- Submit html form on dropdown menu value selection or change using javascript
- How to detect Browser and Operating System Name and Version using JavaScript
- JavaScript : Get current page address
- [javaScript] Convert text case to lowercase
- How to check if a String contains substring or a word using javaScript
- Writing your first Hello, World! 🌍 JavaScript code Tutorial
- JavaScript: Check if variable is a number
- How to send email from JavaScript HTML using mailto
- Meaning of javascript:void(0) explained with example
- How to get query string in JavaScript HTML location.search
- Javascript convert text case from uppercase to lowercase
- Loading previous page using html button using JavaScript
- JavaScript : Get url protocol HTTP, HTTPS, FILE or FTP
- How to get current URL Location using Javascript HTML
- Detect if Cookies are enabled using JavaScript
- Write javaScript code in Swedish using FikaScript
- Add Animated Scrolling to Html Page Title Script
- JavaScript: Convert an Image into Base64 String
- Remove items from JavaScript array
- Send Extra Data with Ajax Get or Post Request
- How to Print from JavaScript HTML using window.print
- Get Device Screen Width and Height using javaScript
- Examples: Convert String to int in JavaScript
- npm WARN saveError ENOENT: no such file or directory, open /mnt/c/package.json
More Posts:
- How to Open Calculator using Mac Terminal - MacOS
- Copy Text to Android Clipboard Programmatically ClipboardManager - Android
- 12 August - International Youth Day celebrated worldwide - News
- How to Add Brew to PATH M1/M2 Mac - MacOS
- Fixed Length Android Edittext - Android
- List of Java versions - Java
- Change CKEditor Table Properties default width - CKEditor
- Notepad++ Save Failed - Please check if this file is opened in another program. - NotepadPlusPlus