透過JS跨網域存取XML檔
為了一些安全性的因素,通常伺服器會阻擋跨網域的XML存取,當然如果你是該網站開發者,所開發的頁面應該將會被放在被認可的網域中,不會碰到這個問題,但我們在開發前期有可能會不在所屬的網域,這樣就會造成開發上的困難,不過我們可以透過Yahoo所提供的YQL查詢語法來解決這個問題,以下就是相關的說明:
若我們在自己的電腦用以下的語法去存取一個網路上的XML
<script> $(function () { var xmlSource = "http://stanley.cloudlab.tw/crossDomainXML/testXML.xml"; $.ajax({ url: xmlSource, success: function (data) { console.log(data); } }) }) </script>
很可能會出現「No Access Control Allow Origin」的訊息:
但如果套用上YQL之後
<script> $(function(){ var xmlSource = "http://stanley.cloudlab.tw/crossDomainXML/testXML.xml"; var yqlURL = [ "http://query.yahooapis.com/v1/public/yql", "?q=" + encodeURIComponent("select * from xml where url='" + xmlSource + "'"), "&format=xml&callback=?" ].join(""); $.getJSON(yqlURL, function(data){ console.log(data) }); }) </script>
可以看到已經可以抓到XML內容,這樣可以讓我們較為方便的去開發,其他詳細的使用說明可以參考Yahoo YQL Guide。
https://cytotecbestprice.pro/# purchase cytotec
Shop smart with amazing deals on Marc Jacobs at the marc jacobs outlet.
I just couldn’t depart your site prior to suggesting that I actually enjoyed the standard information a person provide for your visitors? Is gonna be back often to check up on new posts
https://propeciabestprice.pro/# generic propecia pill
prednisone 30: mail order prednisone – prednisone 60 mg
where can i buy zithromax capsules buy cheap generic zithromax zithromax online
Hello. I desired to decrease a quick term to express my personal many thanks. Ive already been following weblog for a month or so and also have acquired a ton of very good data as well as enjoyed the strategy you have organised your website. I’m attempting to operate my really individual blog nonetheless In my opinion it’s too common as well as I’ve to pay attention to a variety of more compact subjects. Becoming just about all problems to any or all people seriously isn’t all that its cracked as much as be
I’ll right away grab your rss feed as I can not find your e-mail subscription link or e-newsletter service. Do you have any? Kindly let me know so that I could subscribe. Thanks.
https://cytotecbestprice.pro/# buy cytotec in usa
http://nolvadexbestprice.pro/# tamoxifen reviews
prednisone pill 10 mg: prednisone 20mg price in india – by prednisone w not prescription
–Features– NEX:OS is going through a phased development process that will be scaling with development and the community, starting with the Phase called Colosseum. Eventually NEX:OS will shift to a Seasonal model that will offer large expansions to gameplay, Currently there a 5 seasons being penned out for the Colosseum Phase with more in the backlog depending on the needs of the game and community. Practicing your aim by only playing the game and starting all over again every time you lose a round is very time consuming, hence it is neither the best nor the fastest way to boost your aim. It is proven that brief aim training sessions done frequently enough will promote the muscle memory necessary for developing your quick reflexes and reaction time.
http://www.daonmindclinic.com/bbs/board.php?bo_table=free&wr_id=185531
Playseat® Evolution Playseat® Evolution Playseat® Sensation Pro Playseat® L33T Playstation Playseat® Revolution Playseat® L33T Playstation Playseat® Sensation Pro Playseat® Sensation Pro Playseat® L33T Playstation Playseat® Evolution Playseat® Evolution Playseat® Revolution Playseat® Evolution Playseat® Revolution Playseat® Revolution Playseat® Sensation Pro Playseat® Revolution Playseat® Evolution Playseat® L33T Playstation Playseat® Sensation Pro Playseat® Revolution Playseat® Sensation Pro Playseat® L33T Playstation Playseat® L33T Playstation Playseat® Evolution Playseat® Evolution Playseat® Sensation Pro Playseat® L33T Playstation Playseat® Evolution Playseat® L33T Playstation Playseat® L33T Playstation Playseat® L33T Playstation
buy generic propecia pill propecia pill cost generic propecia no prescription
Why you’ll love this interactive online party game: This online game can be set up with five-minute rounds so that you and your group can play as many rounds as you like. Quick and easy to start playing, this game is a great free option for groups looking to explore the globe. A free app for Browser games, by bestgames. r. Except where permitted by law or relevant open source licenses, You will not modify, reverse engineer, decompile, disassemble, decipher the Game software or otherwise try to derive the source code the Game and other confidential contents, including, but not limited to, the Game elements that are not yet voluntarily published by the Company as a public presentation but have already been sealed in the Game installation package.
https://elliothkky026395.blogrenanda.com/33311680/2048-game-online
Whether you’re a fan of Viking history or just love epic battles and brutal combat, these games offer something for everyone. So if you’re ready to dive into the world of Viking warriors and experience the thrill of invading and plundering, our hand-picked list of the best Viking games on PS4 and PS5 is the perfect place to start. Whether you’re a fan of Viking history or just love epic battles and brutal combat, these games offer something for everyone. So if you’re ready to dive into the world of Viking warriors and experience the thrill of invading and plundering, our hand-picked list of the best Viking games on PS4 and PS5 is the perfect place to start. For Honor offers a more grounded depiction of Vikings than many other games. Although they still wear full horned helmets, furs, and colored war paint, the game does a good job of giving a realistic depiction of Vikings. The game uses detailed fighting mechanics that can be complex to beginners. However, once you get the hang of the system you can be very creative in combat.
tamoxifen endometrium: nolvadex vs clomid – tamoxifen and bone density
how to lose weight on tamoxifen: nolvadex for sale amazon – tamoxifen brand name
One thing I want to say is the fact that car insurance cancelling is a dreadful experience so if you’re doing the right things as being a driver you may not get one. Some individuals do obtain notice that they are officially dropped by the insurance company they have to fight to get extra insurance after the cancellation. Low-priced auto insurance rates are often hard to get after a cancellation. Knowing the main reasons with regard to auto insurance cancelling can help motorists prevent losing one of the most vital privileges offered. Thanks for the tips shared via your blog.
Feel free to surf to my web blog … craiglistforsex
You produced some decent points there. I looked on the net to the issue and found most people go together with together with your web site.
Hello! I just wish to provide a enormous thumbs up for any excellent information you have here about this post. I will be coming back to your blog post for further soon.
https://propeciabestprice.pro/# buy generic propecia no prescription
http://cytotecbestprice.pro/# buy cytotec pills online cheap
buy prednisone without a prescription: prednisone over the counter cost – prednisone 50 mg prices
prednisone 20mg price prednisone 10mg online prednisone 20mg price in india
buying from online mexican pharmacy: mexican drugstore online – buying from online mexican pharmacy
reputable mexican pharmacies online buying prescription drugs in mexico mexico drug stores pharmacies
Also visit my homepage – Daycare Near Me
I want to to thank you for this fantastic read!! I absolutely enjoyed every little bit of it. I have you saved as a favorite to look at new stuff you post…
Feel free to surf to my website … Daycare Near Me – Find The Best Daycares Near You
Отличный сайт! Всем рекомендую!пиастрикс казино