jquery:-[object Object] error

后端 未结 4 981
难免孤独
难免孤独 2021-01-11 10:44

i have a validation.js file

var name = $(\"#name\");

    $.ajax({
        type:       \"get\",
        url:        \"test.jsp\",
        data:           \"n         


        
4条回答
  •  一向
    一向 (楼主)
    2021-01-11 11:26

    You will need to pass the value or the text of the #name object. Like this:

    var name = $("#name").val();
    var name = $("#name").text(); 
    

提交回复
热议问题