Because thinkphp is used, _ URL _ can be used directly in html to replace the template, but it cannot be used in the introduced JavaScript. When submitting ajax, url :__ URL _ xxx is required, how to obtain this _ URL __. Is it intercepted by js? Because thinkphp is used, _ URL _ can be used directly in html to replace the template, but it cannot be used in the introduced JavaScript. When submitting ajax, the url is required: __url _/xxx, how to obtain this _ URL __. Is it intercepted by js?
Reply content:
Because thinkphp is used, _ URL _ can be used directly in html to replace the template, but it cannot be used in the introduced JavaScript. When submitting ajax, the url is required: __url _/xxx, how to obtain this _ URL __. Is it intercepted by js?
Try other methods, such as assigning the url to an attribute of an element in HTML.
I use CI, and thinkphp is useless. Usually,