The below function is used to convert the alphabets into uppercase
function convertToUpper(){
var field1 = document.formName.elementName
field1.value = field1.value.toUpperCase();
}
Example :
If the formName is StudentForm and element name is student id like stud100
Then ,
function convertToUpper(){
var field1 = document.StudentForm.StudentId
field1.value = field1.value.toUpperCase();
}
gives the value as STUD100.
One thought on “Conversion of string into uppercase”