新书推介:《语义网技术体系》
作者:瞿裕忠,胡伟,程龚
   XML论坛     W3CHINA.ORG讨论区     计算机科学论坛     SOAChina论坛     Blog     开放翻译计划     新浪微博  
 
  • 首页
  • 登录
  • 注册
  • 软件下载
  • 资料下载
  • 核心成员
  • 帮助
  •   Add to Google

    >> 本版讨论.NET,C#,ASP,VB技术
    [返回] 中文XML论坛 - 专业的XML技术讨论区计算机技术与应用『 Dot NET,C#,ASP,VB 』 → Introduction to JScript.NET 查看新帖用户列表

      发表一个新主题  发表一个新投票  回复主题  (订阅本版) 您是本帖的第 2449 个阅读者浏览上一篇主题  刷新本主题   树形显示贴子 浏览下一篇主题
     * 贴子主题: Introduction to JScript.NET 举报  打印  推荐  IE收藏夹 
       本主题类别:     
     admin 帅哥哟,离线,有人找我吗?
      
      
      
      威望:9
      头衔:W3China站长
      等级:计算机硕士学位(管理员)
      文章:5255
      积分:18406
      门派:W3CHINA.ORG
      注册:2003/10/5

    姓名:(无权查看)
    城市:(无权查看)
    院校:(无权查看)
    给admin发送一个短消息 把admin加入好友 查看admin的个人资料 搜索admin在『 Dot NET,C#,ASP,VB 』的所有贴子 点击这里发送电邮给admin  访问admin的主页 引用回复这个贴子 回复这个贴子 查看admin的博客楼主
    发贴心情 Introduction to JScript.NET


    发信人: zillion (心诚则灵), 信区: DotNET        
    标  题: Introduction to JScript.NET  
    发信站: BBS 水木清华站 (Sun May  6 20:21:34 2001)

    http://www.c-sharpcorner.com/JScript/IntroductionToJScript.asp

    Submitted By Manish B Mehta  

    We have been hearing the announcement from Microsoft right from  
    PDC2000 that they have realsed new languages viz. C#, VB.NET and  
    JScript.NET  
    This artice of mine is going to introduce to u JScript.NET  
    Jscript's association with the ECMAScript standard has helped its  
    success considerably, this has led to a close compatibality with  
    JavaScript. The most dramatic impact on performance in JScript.NET is  
    that it is a true compiled language, which makes it possible to  
    achieve performance comparable to that of C# and Visual Basic.NET. As  
    JScript is a part of .NET it automatically benefits from all the goodies
    .NET offers.

    .NET ships with a compiler for JScript.NET called jsc
    Jscript can be compiled as a .exe or a .dll (default), Jscript can  
    also be used in ASP.NET pages and create web services by specifying  
    "Language=JScript".  

    Creating a Simple .exe using JScript Hello.js
    //Copy this line in a file Hello.js  
    //Compile it as jsc /exe Hello.js to produce Hello.exe  

    print("Hello From Jscript Exe");

      

    Creating a Simple Class in Jscript : Class.js
    //Copy in a file Class.js  
    //Compile it as jsc /exe class.js to produce class.exe  

    class Class1  
    {  
      function sayHi()  
      {  
       return "Hi from JScript Class";  
      }  
    }  
      var o : Class1 = new Class1;  
    print(o.sayHi());   


    A Bit of OOPS in JScript.NET : class1.js  
    //Copy in a file Class1.js  
    //Compile it as jsc /exe Class1.js to produce class1.exe  

    class Class1  
    {  
      function sayHi()  
      {  
       return "Hi from JScript Class";  
      }  
    }  


    class c2 extends Class1  
    {  
      protected var name : String; //variable of type string  

      function get fname() : String //property get (acessor)  
      {  
       return this.name;  
      }  

      function set fname(newName : String) //property let (mutator)  
      {  
       this.name = newName;  
      }  

    }  

      var o : c2 = new c2;  
      print(o.sayHi());  
      o.fname = "Manish";  
      print(o.fname);  

      


    Creating a Simple WebService in JScript.NET : JSweb.asmx  
    <%@ WebService Language ="JScript" Class="MyJS" % >  
    import System.Web.Services;
    class MyJS extends WebService  
    {  
      WebMethodAttribute function sayHi() : String  
      {  
       return "Hi from a JScript.NET web service";  
      }  
    }  
      

    JScript.NET blends seemlessly in the .NET framwework and so will other  
    languages like SmallTalk, FujitsuCOBOL and other .NET compatible  
    languages.  


    --
            Since there's no help,  
            Come let us kiss and part.  


    ※ 来源:·BBS 水木清华站 smth.org·[FROM: 211.100.73.91]
    上一篇
    返回上一页
    回到目录
    回到页首


       收藏   分享  
    顶(0)
      




    ----------------------------------------------

    -----------------------------------------------

    第十二章第一节《用ROR创建面向资源的服务》
    第十二章第二节《用Restlet创建面向资源的服务》
    第三章《REST式服务有什么不同》
    InfoQ SOA首席编辑胡键评《RESTful Web Services中文版》
    [InfoQ文章]解答有关REST的十点疑惑

    点击查看用户来源及管理<br>发贴IP:*.*.*.* 2004/11/9 2:25:00
     
     GoogleAdSense
      
      
      等级:大一新生
      文章:1
      积分:50
      门派:无门无派
      院校:未填写
      注册:2007-01-01
    给Google AdSense发送一个短消息 把Google AdSense加入好友 查看Google AdSense的个人资料 搜索Google AdSense在『 Dot NET,C#,ASP,VB 』的所有贴子 点击这里发送电邮给Google AdSense  访问Google AdSense的主页 引用回复这个贴子 回复这个贴子 查看Google AdSense的博客广告
    2024/5/3 5:19:52

    本主题贴数1,分页: [1]

    管理选项修改tag | 锁定 | 解锁 | 提升 | 删除 | 移动 | 固顶 | 总固顶 | 奖励 | 惩罚 | 发布公告
    W3C Contributing Supporter! W 3 C h i n a ( since 2003 ) 旗 下 站 点
    苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
    62.500ms