--- id: bad87fee1348bd9aedd08830 title: Aggiungere un pulsante di invio a un modulo challengeType: 0 videoUrl: 'https://scrimba.com/p/pVMPUv/cp2Nkhz' forumTopicId: 16627 dashedName: add-a-submit-button-to-a-form --- # --description-- Aggiungiamo un pulsante `submit` al tuo modulo. Facendo clic su questo pulsante invierai i dati dal tuo modulo all'URL specificato con l'attributo `action`. Ecco un esempio di pulsante di invio: ```html ``` # --instructions-- Aggiungi un pulsante come ultimo elemento del tuo elemento `form`, con type `submit` e testo `Submit`. # --hints-- Il tuo `form` dovrebbe contenere un `button`. ```js assert($('form').children('button').length > 0); ``` Il tuo pulsante di invio dovrebbe avere l'attributo `type` settato a `submit`. ```js assert($('button').attr('type') === 'submit'); ``` Il tuo pulsante di invio dovrebbe avere solo il testo `Submit`. ```js assert( $('button') .text() .match(/^\s*submit\s*$/gi) ); ``` Il tuo elemento `button` dovrebbe avere un tag di chiusura. ```js assert( code.match(/<\/button>/g) && code.match(/ ```