Failed to load file:/C:/Users/lenovo/Desktop/wjj-web/data/cnlive.json: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https.
Failed to load file:/C:/Users/lenovo/Desktop/wjj-web/data/cnlive.json: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https.
this happens because you double-click directly to open the page, which cannot load other files through ajax because of cross-domain problems.
you can start a server,tomcat,express,apache, and then you can request lower-level directory files through ajax, and there will be no cross-domain problems.
if you simulate an ajax request, download mock, according to your own configuration, and you can get the data you want
http://mockjs.com/ this is the link.
Previous: How to use Eloquent ORM of laravel to implement a complicated sql statement
Next: After layedit uploads the picture, submit the form to verify that the Times is wrong.
the following is the back-end code I think $username= is a randomly generated string in the output, so write $username=$number; like this, but this is an execution error, how to do it? For advice, thank you <?php $username=$_POST[ username ]; $nu...
the code is as follows async function request(data) { const response = await axios({ method: POST , url: config.apiUrl, headers: { Content-Type : application x-www-form-urlencoded; charset=GBK }, data, responseTy...
how can the data obtained by curl when doing a http request be made immediately? That is, you don t have to rearrange entering data every once in a while or when you have data I know ajax can, but won t there be cross-domain name problems? Although ...
requirements: after the data is successfully loaded through ajax, what if the user refreshes the page and caches the requested data? Instead of requesting back-end data again. Compatible with IE8 and above ...
use webpack to open the front page on the local localhost:8080 port proxy is configured like this: devServer: { port: 8080, contentBase: . dist , proxy: { abc : { target: http: 122.79...
Hello everyone, my sister has recently encountered a problem with the infinite-scroll plug-in. When the scroll reaches the second session, the ajax in the append will fail. Referring to the official documents, we have not found any available resources...
numnumvue axiosasyncawaitupdated...
this is the backend code <?php $password=$_POST[ password ]; function getRandPass(){ $chars = ("0123456789abcdefghijklmnopqrstuvwxyz"); $min = 6; $max = 9; $len = mt_rand($min,$max); $password= ; $a_len = strlen($chars); for...
how the TotalComment, requested through get is assigned to totalComment in data export default { data() { return { contentId:1, focusflag:true, totalComment:TotalComment, reply: , ...
for a single-page application, the current page issues an ajax request. Before the response is returned, the main page on the right side is switched when the menu is switched, and the ajax response of the previous page is returned. There are too many sce...
such as the title. background controller: @RequestMapping("generatorOrder") public TMessage generatorOrder(Order order) { ... } order class: public class Order implements Serializable { private Long orderId; ...
could you tell me how to upload pictures asynchronously by laravel? I always operate in the wrong way! js Code: onAjax(formObj,dataType) { var that = this; var form = $(formObj)[0]; var data = this._formToData(form); ...
I use js to assemble the data and then ajax to transmit it to the background. $request- > file () always cannot receive the file, and the file field passed by is always converted into a string [object File] how to solve foreground ajax code onAjax(f...
-- axios , that I introduced through cdn -- but in Firefox, my request will be blocked. Has anyone ever encountered this situation? --optionchromeIE : ...
php returns data structure here is php flashback structure array { [2018]=>{ [3]=>[...] [2]=>[...] [1]=>[...] } [2017]=>{ [20]=>[...] [19]=>[...] [..]=>[...] } } ajax solve the problem ...
getInfo(){ var that = this let obj = { banner: axios.get(that.url + home.php?Action=banner&setaction=banner ), logo: axios.get(that.url + home.php?Action=advertising&setaction=logo ), code: axios.get(th...
in Google browser, open the written local html, this html has a $.ajax request, and the requested url is a distant server. Before, you can initiate ajax requests, but it will not occur as shown in the following figure: I have tried-- allow-file-access...
assume that there are several of these form <form id="form<?=@$key->{ restaurant-id };?>" enctype="multipart form-data"> I asked for ajax by pressing the button (so I can complete the request at the same time witho...
such as 404 500, these ...
<?foreach ($region_get_all->regions as $key):?> <?endforeach;?> suppose I get multiple numbers via foreach what I want to do is that when the user selects the "edit " data , I will show the div that there will be data , and wil...