default.asp
来自「HTML的企业站系统HTML的企业站系统HTML的企业站系统」· ASP 代码 · 共 105 行
ASP
105 行
<%@ Language=VBScript %>
<%
' ASP Template Example Script 1
' Copyright (C) 2001-2004 Valerio Santinelli
'
' This library is free software; you can redistribute it and/or
' modify it under the terms of the GNU Lesser General Public
' License as published by the Free Software Foundation; either
' version 2.1 of the License, or (at your option) any later version.
'
' This library is distributed in the hope that it will be useful,
' but WITHOUT ANY WARRANTY; without even the implied warranty of
' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
' Lesser General Public License for more details.
'
' You should have received a copy of the GNU Lesser General Public
' License along with this library; if not, write to the Free Software
' Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
'
' ---------------------------------------------------------------------------
'
' Main Example File
'
' Author: Valerio Santinelli <tanis@altralogica.it>
' $Id: default.asp 48 2004-09-02 20:55:01Z tanis $
'
%>
<!--#INCLUDE FILE="..\asptemplate.asp"-->
<%
'Declare our template variable
dim t
'Create the class object
set t = New ASPTemplate
'Set the main template file
t.SetTemplateFile "layout.html"
'Add some custom tags to the template
t.SetVariable "title", "ASP Template Example Script 1"
'We add some more text to this tag
t.Append "title", " - Main Page"
'Load an external file into a tag.
t.SetVariableFile "content", "content.html"
'Load another external file that will be used to draw some blocks
t.SetVariableFile "menu", "menu.html"
'Setup the block
t.UpdateBlock "menu_block"
'Set and parse the block
t.SetVariable "menu_text", "HOME"
t.ParseBlock "menu_block"
'Do it multiple times
t.SetVariable "menu_text", "NEWS"
t.ParseBlock "menu_block"
t.SetVariable "menu_text", "CREDITS"
t.ParseBlock "menu_block"
'Store the blocks in their directory service (order is important)
t.UpdateBlock "c_block"
t.UpdateBlock "b_block"
t.UpdateBlock "a_block"
t.SetVariable "inner", "666666"
t.SetVariable "outer", "Outer Block (A)"
t.SetVariable "whatever", "Block C 1"
t.ParseBlock "c_block"
t.SetVariable "whatever", "Block C 2"
t.ParseBlock "c_block"
t.SetVariable "whatever", "Block C 3"
t.ParseBlock "c_block"
t.SetVariable "into_b", "Block B 1"
t.ParseBlock "b_block"
t.SetVariable "whatever", "Block C 1(b)"
t.ParseBlock "c_block"
t.SetVariable "whatever", "Block C 2(b)"
t.ParseBlock "c_block"
t.SetVariable "inner", "999999"
t.SetVariable "into_b", "Block B 2"
t.ParseBlock "b_block"
t.ParseBlock "a_block"
'Generate the page
t.Parse
'Destroy our objects
set t = nothing
%>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?