Jquery: Running AJAX locally without a webserver

前端 未结 7 836
孤独总比滥情好
孤独总比滥情好 2020-11-30 13:36

I have the following function in a .js file in index.html

function getValues(){

 $.ajax({
   type: \'POST\',
   url: \"http://localhost/getData/getdata.php\         


        
7条回答
  •  执笔经年
    2020-11-30 14:21

    Ajax does not work over the file:// protocol as mentioned by others. Perhaps you want something like http://www.appcelerator.com/ to create desktop apps with html/js/css

提交回复
热议问题