How to send parameters with jquery $.get()

前端 未结 4 2065
粉色の甜心
粉色の甜心 2020-12-02 22:54

I\'m trying to do a jquery GET and i want to send a parameter.

here\'s my function:

$(function() {
    var availableProductNames;
    $.get(\"manag         


        
4条回答
  •  北海茫月
    2020-12-02 23:17

    If you say that it works with accessing directly manageproducts.do?option=1 in the browser then it should work with:

    $.get('manageproducts.do', { option: '1' }, function(data) {
        ...
    });
    

    as it would send the same GET request.

提交回复
热议问题