Home > JavaScript, Technical > Initcap function in JavaScript

Initcap function in JavaScript

June 5, 2012

<script language=”javascript”>

function Initcap(word) {
var retWord = word.substring(0,1).toUpperCase()
+ word.substring(1,word.length).toLowerCase();
return retWord;
}

</script>

Advertisements
Categories: JavaScript, Technical
%d bloggers like this: