submit a value from span field

后端 未结 3 2014
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-16 15:50

i have a from with a submit button

after using jquery the page will have :

for(var i=0 ; i <10 ; i++){
    \'\         


        
3条回答
  •  感动是毒
    2021-01-16 16:09

    Get these values in jQuery like this:

    var ioAddConcept = $(".ioAddConcept").html();
    var ioAddRelation = $(".ioAddRelation").html();
    

    Now you can set these values into form text boxes:

    $('input.ioAddConcept').text( ioAddConcept );
    $('input.ioAddRelation').text( ioAddRelation );
    

    OR if you are submit form via AJAX request:

        $.ajax({
            url     : '/path/to/action.php',
            type    : 'POST',
            data    : 'value1=' + ioAddConcept '&value2=' + ioAddRelation,
            success : function( data ) {
                        alert(data);
                      }
        });
    

    Get these values on server side:

    print_r( $_POST );
    

提交回复
热议问题