jQuery EasyUI Forms - create asynchronous submit form

This tutorial shows you how to submit a form (Form) through easyui. We create a form with name, email and phone fields. Change the form (form) to ajax form (form) by using the easyui form (form) plug-in. The form (form) submits all fields to the background server, and the server processes and sends some data back to the front-end page. We receive the returned data and display it.

Create a form (Form)

  
            <tr>
                <td></td>
                <td><input type="submit" value="Submit"></input></td>
            </tr>
        </table>
    </form>

 

Change to Ajax form

    $('#ff').form({
        success:function(data){
            $.messager.alert('Info', data, 'info');
        }
    });

server side code

form1_proc.php

    $name = $_POST['name'];
    $email = $_POST['email'];
    $phone = $_POST['phone'];

    echo "Your Name: $name <br/> Your Email: $email <br/> Your Phone: $phone";

Guess you like

Origin blog.csdn.net/unbelievevc/article/details/130677158