Loading a text file through AJAX gives restricted URI error

前端 未结 2 2139
天涯浪人
天涯浪人 2020-12-16 23:14

I mentioned i read the suggested link ...and Could not able to understand the suggestion ..\"Use Greasemonkey to modify Pages and start writing some javas

2条回答
  •  庸人自扰
    2020-12-16 23:54

    I finally seems to Get it working . Here is working Script

    $("button").click(function(){
        $.ajax({url:"http://localhost/demo_test.txt",success:function(result){
          $("#div1").html(result);
        }});
      });
    

    Workaround : put the html file and text file on local server (IIS) New Site .

提交回复
热议问题