Load XML File without AJAX

后端 未结 1 1552
感动是毒
感动是毒 2021-01-21 17:05

I want to load a static XML file into HTML and process it without a AJAX request.

I dont want to make an AJAX request because, when that html file is viewed without a we

1条回答
  •  不思量自难忘°
    2021-01-21 18:02

    Short answer - no you can't.

    You cant load the XML into a web page without either using JS/AJAX or a server side language (which you don't have without a web server). This applies of course to the intention of post-processing the data in the HTML-page using jQuery.

    The AJAX request is stopped due to the fact that browsers adhere to the "same origin policy" (See http://en.wikipedia.org/wiki/Same-origin_policy). You can't work around that without either running a local web server or putting the files onto a public web server.

    0 讨论(0)
提交回复
热议问题