JAVASCRIPT transform first character each word to uppercase javascript - Net-Raft.com

Welcome aboard! We are happy you are here and wish you good net-raft!




Just a Web Code Solution

How to transform the first character of each word to uppercase in javascript ?


 496

Show ResultJAVASCRIPT


1

<!DOCTYPE html>
<html>
<head>
<style>
#test
{
margin: auto;
border: 1px solid black;
width: 300px;
height: 200px;
background-color: orange;
color: white;
text-align: center;
}
</style>
</head>
<body>

<button onclick="func()">click to rotate</button>

<div id="test">
<h1>hello javascript!</h1>
</div>

<script>
function func() {

document.getElementById("test").style.textTransform = "capitalize"; // the first character of each word transforms to uppercase or use uppercase or lowercase


document.getElementById("test").style.borderRadius = "25px"; // allows you to add rounded corners to elements
// Code for Safari

document.getElementById("test").style.WebkitTransform = "rotate(30deg)";
// Code for IE9

document.getElementById("test").style.msTransform = "rotate(30deg)";
// Standard syntax

document.getElementById("test").style.transform = "rotate(30deg)";

}
</script>

</body>
</html>


By        
The power of the user (%)
14%



The most helpful JAVASCRIPT solutions

How to get client machine name or computer name with javascript ?How to get client machine name or computer name with javascript ?JAVASCRIPT

Click to see more ...

  14.4K     391

get client hostname javascriptget client hostname javascriptJAVASCRIPT

Click to see more ...

  4.2K     277

detect ie javascriptdetect ie javascriptJAVASCRIPT

Click to see more ...

  2.5K     192

Create fireworks using javascriptCreate fireworks using javascriptJAVASCRIPT

Click to see more ...

  2.5K     161

fire event when user is idle javascriptfire event when user is idle javascriptJAVASCRIPT

Click to see more ...

  2.1K     153

Create progress bar using javascriptCreate progress bar using javascriptJAVASCRIPT

Click to see more ...

  1.4K     152

how to create foreach class using javascript ?how to create foreach class using javascript ?JAVASCRIPT

Click to see more ...

  1.8K     112

create 3d barrel using javascriptcreate 3d barrel using javascriptJAVASCRIPT

Click to see more ...

  2K     113

create qr code javascriptcreate qr code javascriptJAVASCRIPT

Click to see more ...

  1.7K     107

create earth in universe with three.jscreate earth in universe with three.jsJAVASCRIPT

Click to see more ...

  1.5K     91