sarojni agrwal wrote:in which I want to check the numbers in debit card and other fields also, but I am able to check only one, because, in input field onclick function is not used, if there are buttons rather than text boxes then I will handle, by put onclick on every button , but how can I handle here by input text texts?
What makes you think that you need a separate event listener for each input text field? When the user clicks the submit button an event listener on the form element will fire.
event.target will be form element and you can easily get a hold of each of the form's input fields inside the listener and retrieve their values for validation.
In the above code I got the value of the "search" text input element. If there were more text input elements I could get their values in exactly the same manner - no need for separate event listeners.