Posts Tagged "javascrpt"

Capitalize the sentence in Javascript!

Capitalize the sentence in Javascript! <script type="text/javascript" language="javascript">// <![CDATA[ String.prototype.capitalize = function(){ return this.replace( /(^|s)([a-z])/g , function(m,p1,p2){ return p1+p2.toUpperCase(); } ); }; function capWords() { var inputString = document.form1.instring; // The input text field var outputString = document.form1.outstring; // The output text field outputString.value = inputString.value.capitalize(); } // ]]></script> Shashi Dhar KumarShashi Dhar Kumar Experience in Web/software development including client server and implementation using PHP, XML, MySQL and SQL Server. Experience of working on Apache, Linux projects, Javascript, Ajax, Putty,…

Read More