沈阳人流准备多钱:帮忙解决一下几段ASP代码的大概意思啊?

来源:百度文库 编辑:神马品牌网 时间:2024/05/10 11:04:34
一.
<%=LogoUrl%>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<%
function cutstr(tempstr,tempwid)
if len(tempstr)>tempwid then
cutstr=left(tempstr,tempwid)&"..."
else
cutstr=tempstr
end if
end function%>
<style type="text/css">
</style><!-- #include file="Head.asp" -->
</head>

二.
<MARQUEE scrollAmount=1 scrollDelay=4 width=420
align="left" onmouseover="this.stop()" onmouseout="this.start()">
<% call ShowAnnounce(5) %>
</MARQUEE>

1。
\'定义cutstr 函数,要求输入变量为源字符串tempstr和要截取字符数目tempwid
<%function cutstr(tempstr,tempwid)
\'如果tempstr字符数大于tempwid
if len(tempstr)>tempwid then
\'从 tempstr字符串的左侧截取tempwid变量指定数目的字符
cutstr=left(tempstr,tempwid)&\"...\"
\'如果tempstr字符数小于tempwid
else
\'返回原字符串
cutstr=tempstr
end if
end function%>
2。这是一个滚动字幕,当鼠标悬停在其上滚动停止,鼠标移出滚动开始,内容则是函数ShowAnnounce(5)返回的.
<MARQUEE scrollAmount=1 scrollDelay=4 width=420
align=\"left\" onmouseover=\"this.stop()\" onmouseout=\"this.start()\">
<% call ShowAnnounce(5) %>
</MARQUEE>

麻烦说清楚什么错误,把代码都贴来

定义cutstr函数,如果tempstr的字符数大于tempwid的值,就把tempstr截取tempwid位然后加上...
定义一个MARQUEE 就是能滚动的一个区域
call ShowAnnounce(5) 是调用一个自己定义的过程

定义了一个函数cutstr切取左边的一部分,取几个由参数tempwid决定,如果字符串长度没有tempwid大就返回参数tempstr
<!-- #include file="Head.asp" --> 导入head.asp的
类容

一、定义cutstr函数并有tempstr,tempwid为形参,如果tempstr的长度大于tempwid 就从tempstr的左边取tempwid 并加上...样式为css
二、定义一个滚动区域,从左边起,速度为4,宽度为420,鼠标指在上边时停止,鼠标移开是滚动 最后调用函数 ShowAnnounce(5)