[Solved] XMLHttpRequest cannot load file:///C:/Users/hamma/Desktop/rao.html


According to your console output:

XMLHttpRequest cannot load file:///C:/Users/hamma/Desktop/rao.html. Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https, chrome-extension-resource.

That means that you are trying to run the file without a server i.e. file:///[...] and for security reasons you can’t run AJAX requests like that.

You need to setup a server and run the page through that to send requests.

More Help

If you are using Chrome, try this.

Reading Material

Same-Origin-Policy

CORS

2

solved XMLHttpRequest cannot load file:///C:/Users/hamma/Desktop/rao.html