开发者

AJAX request URL routing

开发者 https://www.devze.com 2023-03-28 20:56 出处:网络
This strikes me as somewhat similar to this question I\'ve got an AJAX request on my page, and the pag开发者_开发技巧e location is /a/b/c. I want to send the request to d. Sending it to /d or to a/b/

This strikes me as somewhat similar to this question

I've got an AJAX request on my page, and the pag开发者_开发技巧e location is /a/b/c. I want to send the request to d. Sending it to /d or to a/b/d I can do. However, I need to route it to a/b/c/d. How do I do that?


Use the current page url and append /d to it.

eg.

var urlToUse = location.href + "/d";
0

精彩评论

暂无评论...
验证码 换一张
取 消