jquery ajax call from select box

前端 未结 2 875
花落未央
花落未央 2020-12-20 05:33

How to make ajax call from onchange event of select box using jquery? If anyone has a sample, please post the code.

2条回答
  •  我在风中等你
    2020-12-20 06:17

    $("#selectboxid").change(function() {
      $.ajax({ url: "test.html", context: document.body, success: function(){
        $(this).addClass("done");
      }});
    });
    

提交回复
热议问题