Visualizzazione dei risultati da 1 a 4 su 4
  1. #1

    fare il submit di una form senza id...

    Se ho un codice così:

    <form action="mypage.php" method="post">
    blabla
    </form>

    come posso fare il submit via javascript?
    posso dargli un id in qualche modo?

    Grazie.
    GdR Online - http://lenar.it/
    Yesterday is history. Tomorrow is mystery.
    Today is a gift. That's why it's called the present

  2. #2
    Utente di HTML.it
    Registrato dal
    Jun 2005
    Messaggi
    2,125
    document.nomeForm.submit();

    ovviamente
    <form action="page.php" name="nomeForm" method="post">

  3. #3
    appunto...se non ho il nome del form?
    GdR Online - http://lenar.it/
    Yesterday is history. Tomorrow is mystery.
    Today is a gift. That's why it's called the present

  4. #4
    Frontend samurai L'avatar di fcaldera
    Registrato dal
    Feb 2003
    Messaggi
    12,924
    se hai un solo form


    document.getElementsByTagName('form')[0].submit()
    Vuoi aiutare la riforestazione responsabile?

    Iscriviti a Ecologi e inizia a rimuovere la tua impronta ecologica (30 alberi extra usando il referral)

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.