jQuery EasyUI modulo - per creare un modulo di presentazione asincrona
Questo tutorial vi mostra come presentare un modulo (Form) per easyui. Creiamo un nome di modulo, e-mail e telefono con campi. Utilizzando modulo easyui (modulo) plug-in di cambiare forma (forma) è forma ajax (modulo). Form (modulo) per presentare tutti i campi al server back-end, l'elaborazione del server, e inviare alcuni dati torna alla prima pagina. Riceviamo dati avanti e mostrare fuori.
Creare un modulo (Form)
<Div style = "padding: 3px 2px; border-bottom: 1px solid #ccc"> Ajax Modulo </ div> <Form id = azione "ff" = "form1_proc.php" method = "post"> <Table> <Tr> <Td> Nome: </ td> <Td> <input name = "nome" type = "text"> </ input> </ td> </ Tr> <Tr> <Td> Email: </ td> <Td> <input name = tipo "e-mail" = "text"> </ input> </ td> </ Tr> <Tr> <Td> Telefono: </ td> <Td> <input name = tipo "telefono" = "text"> </ input> </ td> </ Tr> <Tr> <Td> </ td> <Td> <input type = "submit" value = "Invia"> </ input> </ td> </ Tr> </ Table> </ Form>
Cambiato modulo Ajax
$ ( '# FF'). Modulo ({ successo: la funzione (dati) { $ .messager.alert ( 'Info', i dati, 'Info'); } });
codice lato server
form1_proc.php
$ Name = $ _POST [ 'name']; $ Email = $ _POST [ 'email']; $ Phone = $ _POST [ 'telefono']; echo "Il tuo Nome: $ <br/> tua email: <br/> del telefono $: $ telefono";