Why is my REST method not being called by this jQuery?

前端 未结 5 1824
星月不相逢
星月不相逢 2021-01-25 21:32

I have a similar question about jQuery button click handler code not being fired at all here.

In this case, it is being fired (when the jQuery is added to a sta

5条回答
  •  不思量自难忘°
    2021-01-25 22:36

    You're only giving your jQuery the controller and action names when it needs the full url to complete the request. Also, your end point has an 'api' prefix. You need your url property to be something like http://localhost:{port}/api/{controller}/{action} if your server is running locally.

提交回复
热议问题