![]() ![]() ![]() ![]() |
|||||
|
|||||
樓主 calvin ![]()
![]() |
請教各位先進, 如何寫 ajax script 從公開資訊觀測站 取得公司 (example 2330) 101/3/1 - 101/3/31 所發表的重大訊息 http://mops.twse.com.tw/mops/web/t05st01 co_id = 2330 year = 101 month = 03 b_date = 01 e_date = 31 (The following sample ajax script retrieves the most recent monthly revenue for TSMC (2330). Obviously what I am looking for is a little more complicated as it needs to include a few more parameters (co_id, year, month, b_date, e_date) http://mops.twse.com.tw/mops/web/ajax_t05st10?encodeURIComponent=1&step=2&firstin=1&off=1&keyword4=&code1=&TYPEK2=&checkbtn=&queryName=co_id&TYPEK=all&isnew=true&co_id=2330 ) 謝謝
本篇文章發表於2012-04-26 10:24
|
1樓 |
to calvin
這裡有初步說明(參考ajax無法跨網域) http://www.blueshop.com.tw/board/show.asp?subcde=BRD20090730105904ZE6 建議用php或asp.net 取得網頁內容 http://blog.yam.com/htshboy/article/14726907
本篇文章回覆於2012-04-26 11:33
== 簽名檔 ==
--未登入的會員無法查看對方簽名檔-- |
2樓
作者回應
calvin ![]() |
Hi S:
Sorry, I am not sure if I understood your comment about "ajax無法跨網域" For example the following ajax script entered into IE web-address line will retrieve the latest revenue information for 2330. What I am looking for is an ajax script for IE to retrieve 重大訊息. 謝謝. http://mops.twse.com.tw/mops/web/ajax_t05st10?encodeURIComponent=1&step=2&firstin=1&off=1&keyword4=&code1=&TYPEK2=&checkbtn=&queryName=co_id&TYPEK=all&isnew=true&co_id=2330
本篇文章回覆於2012-04-26 12:40
== 簽名檔 ==
--未登入的會員無法查看對方簽名檔-- |
3樓
作者回應
calvin ![]() |
Hi S:
What I am looking for is some suggestion on writing an ajax web query string - a one-line code, not a script (sorry for the confusion) Thanks
本篇文章回覆於2012-04-26 13:57
== 簽名檔 ==
--未登入的會員無法查看對方簽名檔-- |
4樓
最有價值解答
自然風 ![]() |
Dear Calvin:
it's not diffcult. You just use "HttpWebRequest" to get the url data. then show it on your page . I supply a example(I try to get stock data): Client side : Service side : this example it can be work. i try it and success get data. ^_^
本篇文章回覆於2012-05-16 15:51
== 簽名檔 ==
--未登入的會員無法查看對方簽名檔-- |
5樓 |
alert(data);
這個data,你就可以用 document.getElementById('xxx').innerHTML = data 這樣就達到你要的ajax效果了。
本篇文章回覆於2012-05-17 16:39
== 簽名檔 ==
--未登入的會員無法查看對方簽名檔-- |
6樓
作者回應
calvin ![]() |
Thank You.
本篇文章回覆於2012-05-18 16:11
== 簽名檔 ==
--未登入的會員無法查看對方簽名檔-- |
回覆 |
如要回應,請先登入. |