I have a page with several forms. At any time, when the user clicks on the input or changes the text in the input line, I need a function that you call. Any ideas on how to do this efficiently and in what form, where does it not require form identifiers?
JavaScript events pop up. So what about:
$('form').change(function() { // do something }).click(function() { // do something });
In each case, you can request the element that triggered the event and do what you like.
$('form input').each(function() { var val = this.value; $(this).click(function() { } $(this).blur(function() { } });
. .
Source: https://habr.com/ru/post/1754047/More articles:How to set color for NSAttributedString on iPad? - colorsProblem NSTimer - objective-cOrganizing Java Programs: How Can I Get Rid of This Mass Case Report? - javaSuicide: Objective-C objects by calling their own methods -dealloc - objective-cHow to use netstream.appendBytes () to dynamically stream HTTP? - flashget global IP address - c ++3D scene in three-dimensional scene - c #Escape double quotes in asp.net Onclick String - evalASP.NET MVP как симбиоз ASP.NET Webforms и ASP.NET MVC - asp.nethow to programmatically create a tab and add buttons to it - iphoneAll Articles