- Back to Home »
- javascript »
- Change Case through JS | javascript
Posted by : food
Sunday, 21 April 2013
Change case (uppercase,lowercase etc..) with the simplest use of javascript
Write this Code in Text Editor (Any, Notepad , Notepad ++ , Dreamweaver)
<html>
<head>
 <script language="javascript">
  function c1(c)
  {
   j1.style.textTransform=c  
  }
 </script>
</head>
<body>
 <form name="f1">
 <input type="radio" name="g1" onClick="c1('uppercase')"> UPPERCASE
 <input type="radio" name="g1" onClick="c1('lowercase')"> lowercase
 <input type="radio" name="g1" onClick="c1('capitalize')"> Capitalize
 <input type="radio" name="g1" onClick="c1('none')"> normal
 </form>
 <h1 id="j1">change the case</h1>
</body>
</html>
 
 
