网站首页  汉语字词  英语词汇  考试资料  写作素材  旧版资料

请输入您要查询的范文:

 

标题 asp中with End with
范文
    在看高手写的asp代码中看到asp代码用with来表示对象,其asp结构形式 with ...End with.
    代码如下:
    <%
    sql = "select * from table"
    set rs = server.createObject("adodb.recordset")
    with rs
    .open sql,foraspcn,1,1
    if .eof or .bof then
    response.write "没有asp关于with end with 内容"
    .close
    else
    response.write "有相关asp中with end with的内容"
    .close
    end if
    end with
    %>
    上面是关于with 的一个例子.查询微软官方网站制作学习网
    with ..end with 执行重复引用单个对象或结构的一系列语句。
    参考地址:http://msdn.microsoft.com/zh-cn/library/wc500chb(VS.80).aspx
    其实也很好理解with ..end with的意思
    就是在下面的语句中省略了with 后参数.可以直接调用其.方法的形式
    再次举例
    <%
    Class forasp'定义一个类
    Public webname
    Public weburl
    End class
    Set foraspcn = new forasp'设置foraspcn为一个对象
    with foraspcn
    .webname= "这里是网站制作学习网"
    .weburl = "http://www.ynpxrz.com/"
    end with
    response.write foraspcn.weburl
    %>
随便看

 

在线学习网范文大全提供好词好句、学习总结、工作总结、演讲稿等写作素材及范文模板,是学习及工作的有利工具。

 

Copyright © 2002-2024 cuapp.net All Rights Reserved
更新时间:2025/5/15 4:05:30