How to make AJAX work on local server using XAMPP or node.js

ぃ、小莉子 提交于 2019-12-06 11:43:58
Steven Martin

is XAMPP working? can you access it via http://localhost?

AJAX is just javascript that can send requests without reloading the entire page. it doesn't need anything special to work.

however its important that localhost is working and keep note if you need to add a port to the end of the url to get it to work.

then add your html/php file into the htdocs folder of XAMPP and navigate to it using the localhost url.

In case you have Visual Studio installed. Click

  1. File Menu
  2. Open
  3. Web site
  4. Select the website folder
  5. Hit F5 to run the app

First, you have to create your html file; do it in the "htdocs" folder of XAMPP, which is likely to have its folder on your C: hard drive path, unless you moved it elsewhere.

Secondly, start XAMPP Apache server. Now you can access your html web page via web browser at "localhost/yourwebpage.html".

Hope this help everyone!

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!