为了手机看些宣传 加载速度为了快
采用纯html 利用js加载写好webservice 在页面显示数据
2个问题
一,脚本函数我自己写的读不出来 呵呵 技术差求指教
二,xml list解析
谢谢大虾指导
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>ly.html</title>
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="this is my page">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<!--<link rel="stylesheet" type="text/css" href="./styles.css">--> <title>Hello World</title>
<script language="JavaScript">
var iCallID;
function InitializeService(){
service.useService("futstar.wlwlw.net/NodeService.asmx?WSDL", "GetAllNodes");
service.HelloWorldService.callService("HelloWorld");
}
function ShowResult(){
alert(event.result.value);
}
</script>
</head>
<body onload="InitializeService()" id="service"
style="behavior:url(webservice.htc)" onresult="ShowResult()"> </body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>ly3.html</title>
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="this is my page">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<script type="text/javascript">
function hcr()
{
};
function getfemale()
{
//第一个参数是webservice的url,后面是名称
female.useService("futstar.wlwlw.net/NodeService.asmx?WSDL","NodeService");
//设置一个回调函数,service返回结果的时候回调;第一个参数是回调函数的名称,后面的是webservice的参数
intCallID=female.news.callService(female_result,"GetAllNodes","list"); //这里有两个参数.....
}
function female_result(result)//回调函数
{
if(result.error)
{
female.innerHTML=result.errorDetail.string;
}
else
{
female.innerHTML=result.value; //将webservice返回的结果写如div中
}
}
</script>
<style type="text/css">
.hcr{
onmouseover.this.class="xxx"}
</style>
</head>
<body>
<img id="hcr" src="img/1.png" onmouseover="this.src='img/2.png';getfemale();" onmouseout="this.src='img/1.png'"/>
<div id="female" style="BEHAVIOR:url(WebService.htc)"></div>
</body>
</html>可以无视我的function 有别的方法也行啊目标如上诉 所谓千方百计解决老板- -
采用纯html 利用js加载写好webservice 在页面显示数据
2个问题
一,脚本函数我自己写的读不出来 呵呵 技术差求指教
二,xml list解析
谢谢大虾指导
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>ly.html</title>
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="this is my page">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<!--<link rel="stylesheet" type="text/css" href="./styles.css">--> <title>Hello World</title>
<script language="JavaScript">
var iCallID;
function InitializeService(){
service.useService("futstar.wlwlw.net/NodeService.asmx?WSDL", "GetAllNodes");
service.HelloWorldService.callService("HelloWorld");
}
function ShowResult(){
alert(event.result.value);
}
</script>
</head>
<body onload="InitializeService()" id="service"
style="behavior:url(webservice.htc)" onresult="ShowResult()"> </body>
</html>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>ly3.html</title>
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="this is my page">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<script type="text/javascript">
function hcr()
{
};
function getfemale()
{
//第一个参数是webservice的url,后面是名称
female.useService("futstar.wlwlw.net/NodeService.asmx?WSDL","NodeService");
//设置一个回调函数,service返回结果的时候回调;第一个参数是回调函数的名称,后面的是webservice的参数
intCallID=female.news.callService(female_result,"GetAllNodes","list"); //这里有两个参数.....
}
function female_result(result)//回调函数
{
if(result.error)
{
female.innerHTML=result.errorDetail.string;
}
else
{
female.innerHTML=result.value; //将webservice返回的结果写如div中
}
}
</script>
<style type="text/css">
.hcr{
onmouseover.this.class="xxx"}
</style>
</head>
<body>
<img id="hcr" src="img/1.png" onmouseover="this.src='img/2.png';getfemale();" onmouseout="this.src='img/1.png'"/>
<div id="female" style="BEHAVIOR:url(WebService.htc)"></div>
</body>
</html>可以无视我的function 有别的方法也行啊目标如上诉 所谓千方百计解决老板- -
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货