开发者

Reading server-side XML with JavaScript and jQuery

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜