Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Alessandro Pellizzari Newsgroups: it.comp.lang.javascript Subject: Re: Selezione di radio button in sezioni differenti di una form Date: Tue, 13 Nov 2018 10:30:29 +0000 Lines: 25 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: individual.net r7qWcCWCRCG92Soxehs9sAqS6+nrtmg3OENgVeTAjUmh7bqRA= Cancel-Lock: sha1:kMjDkxnAI2zdHsXmLQkogwppnYk= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 In-Reply-To: Content-Language: en-GB Xref: csiph.com it.comp.lang.javascript:8273 On 12/11/2018 14:43, Gianfranco wrote: >> $('button.attivaTutti').on('click', function() { >> $('.gruppoDaAttivare input[type=radio].si').attr('checked', true); >> }); >> > > Grazie dell'esempio e dell'esercizio; Non รจ difficile da capire. Traducilo in inglese e pensa a "$" come "find" e a "." come "then". Dentro le virgolette di jQuery pensa in CSS: i punti sono class, gli # sono id, le parentesi quadre sono ricerca negli attributi Tradotto in inglese: Find the button attivaTutti, then, on click, do this: Find anything with class gruppoDaAttivare and inside it find all the inputs of type radio with a class "si", then set the attribute "checked" to "true" Dovrebbe essere abbastanza comprensibile anche se conosci poco l'inglese. Bye.