There are 6 (maybe more) fields (div) on the page; I consider each field as an object.
function Field(obj, params){ .... self init=function(){ ΠΠ½ΠΈΡΠΈΠ°Π»ΠΈΠ·ΠΈΡΡΠ΅Ρ ΠΏΠΎΠ»Π΅: ΠΎΠ±Π½ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ Π² Π½ΡΠΆΠ½ΡΠΉ ΠΌΠΎΠΌΠ΅Π½Ρ; ΠΏΡΠΈΡΠ²ΠΎΠ΅Π½ΠΈΠ΅ ΠΏΠΎΠ»Ρ ΡΠ»Π΅ΠΌΠ΅Π½ΡΠΎΠ² ΠΈΡΠ΄ } self edit = function(){ ΠΡΠΊΡΡΠ²Π°Π΅Ρ ΠΌΠΎΠ΄Π°Π» Π΄Π°Π½Π½ΠΎΠΌΡ ΠΏΠΎΠ»Ρ Π΄Π»Ρ ΡΠ΅Π΄Π°ΠΊΡΠΈΡΠΎΠ²Π°Π½ΠΈΡ Π½Π°ΡΡΡΠΎΠ΅ΠΊ ΠΈΡΠ΄. } .... self.init(); }
Tell me how to initialize all fields when loading the page?
field_1=new Field("id ΠΏΠΎΠ»Ρ");
How to find all fields and initialize if each field has an id? How to be if fields are classified?
Write in the comments, if itβs not clear, I donβt know how to formulate the question differently.