显示页面加载时间
页面顶部添加下面的代码:
<%
dim strstarttime
dim strendtime
strstarttime = timer '开始时间
%>
页面(同一页)的末尾添加:
<%
' 加载完毕的时间
strendtime = timer
response.write ("页面加载时间: ")
response.write formatnumber(strendtime - strstarttime, 4)
response.write (" 秒.")
%>
显示字符串前20个字符并在结尾处添加“……”
<%
dim cutshort
cutshort = rsyourrecordset.fields.item("yourfield").value
response.write left (cutshort, 20) & "........"
%>
如果动态图片为空,用默认图片代替
<%
dim picshow
picshow = rsshowhide.fields.item("shmainpix").value
if picshow <>"" then %>
<img src="<%=rsshowhide.fields.item("shmainpix").value%>">
<% else %>
<img src="staticpic.gif">
<% end if %>