How do i send the data to edit boxes on the same page?

前端 未结 2 351
花落未央
花落未央 2021-01-17 05:39

i have the following page generated

when i click the Edit link, the record data must be sent to the input boxes on teh same page (without refreshing the pa

2条回答
  •  终归单人心
    2021-01-17 06:29

    write script for ajax call:

    $('#edit').click(function () {
             // var data = {here you will pass item.id }
            $.ajax({
                url:'ProductCategoryController/Edit', 
                data: {id : data}
                method:'GET',
                success: function (data) { 
                       //clear html page here
                       //reload html page by passing 'data' passes in function
                 //e.g. suppose html page id is 'xyz' then $("#xyz").html(data)
                      }
            });
    
        });
    

提交回复
热议问题