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

请输入您要查询的考试资料:

 

标题 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 5:54:46