下面的asp代码怎么改成js调用呀!求高手指点?小弟万分感激!! 100
myxml="http://www.hnta.cn/APIs/API_Get_NewsList.Asp?m=1&cid=J162HHC8824H&page=1&pages...
myxml="http://www.hnta.cn/APIs/API_Get_NewsList.Asp?m=1&cid=J162HHC8824H&page=1&pagesize=10"
set xml = server.CreateObject("Microsoft.XMLDOM")
xml.async = "false"
xml.resolveExternals = "false"
xml.setProperty "ServerHTTPRequest", true
xml.load(myxml)
Set objNodes = xml.getElementsByTagName("news")
For i = 0 to objNodes.length - 1
Response.write "<li><a href='http://www.hnta.cn"&Trim(objNodes(i).selectSingleNode("url").Text)&"' target='_blank'>"&Trim(objNodes(i).selectSingleNode("title").Text) &"</a></li>"
Next 展开
set xml = server.CreateObject("Microsoft.XMLDOM")
xml.async = "false"
xml.resolveExternals = "false"
xml.setProperty "ServerHTTPRequest", true
xml.load(myxml)
Set objNodes = xml.getElementsByTagName("news")
For i = 0 to objNodes.length - 1
Response.write "<li><a href='http://www.hnta.cn"&Trim(objNodes(i).selectSingleNode("url").Text)&"' target='_blank'>"&Trim(objNodes(i).selectSingleNode("title").Text) &"</a></li>"
Next 展开
展开全部
只要把
response.write "<li><a href='http://www.hnta.cn"&Trim(objNodes(i).selectSingleNode("url").Text)&"' target='_blank'>"&Trim(objNodes(i).selectSingleNode("title").Text) &"</a></li>"
改
response.write "document.write(""<li><a href='http://www.hnta.cn"&Trim(objNodes(i).selectSingleNode("url").Text)&"' target='_blank'>"&Trim(objNodes(i).selectSingleNode("title").Text) &"</a></li>"");"
response.write "<li><a href='http://www.hnta.cn"&Trim(objNodes(i).selectSingleNode("url").Text)&"' target='_blank'>"&Trim(objNodes(i).selectSingleNode("title").Text) &"</a></li>"
改
response.write "document.write(""<li><a href='http://www.hnta.cn"&Trim(objNodes(i).selectSingleNode("url").Text)&"' target='_blank'>"&Trim(objNodes(i).selectSingleNode("title").Text) &"</a></li>"");"
追问
不行呀,小弟是个菜鸟,望大哥能够详细点呀,比如说xml.async = "false"这里的双引号用去掉吗?请高手帮忙呀,小弟愿把分都给你
追答
那里的双引号要去掉的
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询