I can loop through records with
$("#btnVerTest").on("click", function () {
for (let i = 1; i <= 3; i++) {
if ($("#txtCor" + i).text() == "DA") {
$("#inputRasCor").val($("#txtRas" + i).text());
$("#inputCor").val($("#txtCor" + i).text());
}
};
})
where txtCor has id from 1 to 3.
How can I loop through records if all id's have letters instead of numbers, A, B and C? txtCorA, txtCorB, txtCorC and so on

Amit MohantyPosted Aug 19, 2023, 9:03 AM
If your IDs have letters instead of numbers (e.g., txtCorA, txtCorB, txtCorC), you can use an array of letters to loop through them.
Cr BhargaviPosted Aug 21, 2023, 4:46 AM
Hi, Please try like below
Sam HobbsPosted Aug 20, 2023, 2:09 AM
I am sorry that I do not have the exact code to solve your problem but it is possible to convert a letter to a number and a number to a letter as in the following.
In the C language and most languages like C, it is very easy to convert a letter to a number and a number to a letter because in C and C++ they are the same thing. JavaScript makes it too complicated.
Marius VasilePosted Aug 19, 2023, 9:05 AM
So simple, thank you Amit