search

Home  >  Q&A  >  body text

Problem with jQuery load method - Stack Overflow


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

w3c link

曾经蜡笔没有小新曾经蜡笔没有小新2720 days ago693

reply all(4)I'll reply

  • 高洛峰

    高洛峰2017-06-20 10:08:43

    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...

    reply
    0
  • 習慣沉默

    習慣沉默2017-06-20 10:08:43

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

    reply
    0
  • 怪我咯

    怪我咯2017-06-20 10:08:43

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

    reply
    0
  • 扔个三星炸死你

    扔个三星炸死你2017-06-20 10:08:43

    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?

    reply
    0
  • Cancelreply