Passing Javascript Variable to PHP using Ajax

前端 未结 2 626
终归单人心
终归单人心 2020-11-28 16:54

I\'m working on an existing script at the moment which uses Ajax, something I\'ve never worked with before. I have a variable set in my javascript file which gets its value

2条回答
  •  北荒
    北荒 (楼主)
    2020-11-28 17:06

    Or you can do this:

    data: "userID=" + onlyID + "&credoff=" + credoff
    

    don't forget the ampersand! &

提交回复
热议问题