动网论坛,站长建站首选,国内使用量最多的论坛软件 动网论坛官方技术讨论区 站长工具 申请属于您自己的免费论坛
首页 | 新闻资讯 | 网站运营 | 网络编程 | 数据库 | 服务器 | 网页设计 | 图像媒体 | 网络应用 | 搜索优化 | 资源下载 | 动网主机 | DVBOX
    本站内  互联网 ASP论坛  ASP.Net论坛  PHP论坛
   .Net → 阅读文章

 使用JScript.NET创建asp.net页面(七)

作者:chenyangasp 来源:chinaasp 
阅读 3741 人次 , 2001-8-17 

例子2
<%@ WebService Language="JScript" class="Weather"%>
import System
import System.Web.Services
class Weather {
WebMethodAttribute function getConditions(strCity : String) : String
{
var now = new Date();
switch (strCity.toUpperCase())
{
case "LONDON":
if (now.getMonth() <= 7||now.getMonth() >=9)
{
return "overcast"
}
if
{
return "partly overcast"
}
break;
case "SEATTLE":
if (now.getMonth() == 7 && now.getDay()==4)
{
return "torrential rain"
}
else
{
return "rain"
}
break;
case "LA":
return "smoggy"
break;
case "PHOENIX":
return "damn hot"
break;
default:
return "partly cloudy with a chance of showers"
}
}
}
  
 本文TagsC#  组网  
 收藏本文  打印本文  论坛讨论  关闭窗口
· 上一篇:是否能让JAVA 和 .NET框架共存
· 下一篇:使用JScript.NET创建asp.net页面(六)
· 五、读取HTTP请求头
· 从ASP迁移至ASP+ --急不可耐了?转换其他的页面吧
· 使用JScript.NET创建asp.net页面(七)
· asp.net中的vb7中如何调用dll中的函数
· Microsoft .NET Romoting 框架简介


关于本站 | 联系我们 | 业务合作 | 客户案例 | 诚聘英才 | 广告合作 | 收藏本站
海口动网先锋网络科技有限公司版权所有
Copyright © 2000 - 2006 Cndw.Com
中华人民共和国电信与信息服务业务经营许可证编号 琼 ICP 020077