1.
If you want to get the data for HTTP://HQ.SINAJS.CN/RN=61FDJ&FORMAT=TEXT&LIST=STOCK_SH_UP_5MIN_20 output
Open the link, you can see the output is stock_sh_up_5min_20 = ...
That is, the server returns a section of JS code, so we create a local <script></script>, and the src equals the above link, like this:
<script src= "http://hq.sinajs.cn/rn=61fdj&format=text&list=stock_sh_up_5min_20" language= "JavaScript" ></script>
Then it's the equivalent of getting the data inside (although the variables are not our definition, but adding this script is the equivalent of defining the variables, and the scripts have these variables), and then we can use them, like this:
<script language= "JavaScript" >alert (stock_sh_up_5min_20[0].symbol) </script>
Like, there's this.
< Script type="text/javascript " src= " http://hq.sinajs.cn/list=sh601006 " charset="gb2312"></ script>
<script type= "text/javascript">
var elements=hq_str_sh601006.split (",");
document.write (" Current price:"+ ELEMENTS[3]);
</script>
2.