开发者

Reading server-side XML with JavaScript and jQuery

开发者 https://www.devze.com 2023-01-03 14:29 出处:网络
this is quite a simple question hopefully. Our client currently has a Flash banner ad on their site which they can change the text size, colour, position etc. by editing an XML file. They want to sc

this is quite a simple question hopefully.

Our client currently has a Flash banner ad on their site which they can change the text size, colour, position etc. by editing an XML file. They want to scrap flash and use JavaScript and jQuery. Now, as long as the XML file开发者_如何学C is at a readable URL I should be able make an AJAX request for the file and use it. Is that correct?

Many thanks


Yes. http://api.jquery.com/jQuery.get/
EDIT: Of course I forgot about the same origin policy: http://en.wikipedia.org/wiki/Same_origin_policy


Yes … and No: The URI must be on the same host (and port, etc, etc) or run into the Same Origin Policy.

0

精彩评论

暂无评论...
验证码 换一张
取 消