Problem with jQuery load method - Stack Overflow
曾经蜡笔没有小新
曾经蜡笔没有小新 2017-06-20 10:06:43
0
4
644


I didn’t test this method successfully. Can you help me find out what’s wrong?

w3c link

曾经蜡笔没有小新
曾经蜡笔没有小新

reply all (4)
小葫芦

Under Chrome, using XMLHttpRequest to request the file protocol will be considered cross-domain. You can use Firefox to test, or set up a server

https://stackoverflow.com/que...

    習慣沉默

    Ajax file request is definitely not possible. Put the project on the server and let the server return header.html.

      刘奇

      You can use node to set up a server yourself, and then make requests

        扔个三星炸死你

        load(url,data,function(response,status,xhr))
        The url here should be an address that can return a string-like address.
        Did you understand it wrong? What does it mean to put header.html? Do you want to return the content of the html file?

          Latest Downloads
          More>
          Web Effects
          Website Source Code
          Website Materials
          Front End Template
          About us Disclaimer Sitemap
          php.cn:Public welfare online PHP training,Help PHP learners grow quickly!