也可以参考下例----或直接在网站上查找插件。
使用说明:
页面引入以下脚本
<script src="http://js.jrj.com.cn/hq/co/swfobject.js" type="text/javascript"></script>
<script src="http://js.jrj.com.cn/hq/co/flash4code.js" type="text/javascript"></script>
调用javascript函数
jrj_show_flash(s_code,s_type,divId,flashWidth,flashHeigth)
s_code:证券代码
s_type:证券类型,s表示股票,i表示指数,传空字符串默认为股票
divId:div容器id
flashWidth:flash宽度
flashHeigth:flash高度
调用webservice的处理页面(AjaxTest.aspx):webxml.ChinaStockWebService ws = new webxml.ChinaStockWebService()
Response.Write(ws.getStockInfoByCode("sh601857")[1])//参数可以用get方式传递,我为了省事写死了,取得返回的数组的第一个元素,也就是股票名称
Response.End()
取股票名称的页面,使用ajax调用:
<script type="text/javascript">
$(function()
{
$("#btnAjaxGet").click(function(event)
{
$("#divResult").load("AjaxTest.aspx")
})
})
</script>
<button id="btnAjaxGet">取股票信息</button><br />
<div id="divResult" style="border:1px solid redwidth:200pxheight:20px"></div>
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)