Archive

Archive for February, 2017

Convert Text in TextBox to Upper Using JavaScript

February 20, 2017 Leave a comment

Hi all,

Try this example to Convert Text in TextBox to Upper using Javascript

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script type="text/javascript">
 function Capital(txt) {
 txt.value = txt.value.replace(/^\s+/, '').toUpperCase();
 }
 </script>
</head>
<body>
Enter Name:
<input type="text" value=" " onkeyup="Capital(this)" />
</body>
</html>

Hope this helps

Good Luck.

Advertisements
Categories: ASP.Net