ASP common code

xiaoxiao2021-03-06  103

Display page load time

Add the following code at the top of the page:

<% DIM STRSTARTTIMEDIM StrendTime

StrstartTime = Timer 'starts%>

The end of the page (the same page) Add:

<% 'Loaded at STRENDTIME = Timer

Response.write ("page load time:")

Response.Write FormatNumber (StrendTime - StrstartTime, 4) Response.write ("Second.")%>

The top 20 characters before displaying the string and add "..." at the end.

<% DIM CUTSHORTSHORT = rsYourRecordSet.fields.item ("Yourfield"). ValueResponse.write Left (Cutshort, 20) & "........"%>

If the dynamic picture is empty, use the default picture instead

<% DIM PICSHOWPICSHOW = rsShowHide.fields.Item ("shmainpix"). Valueif PicShow <> "" "> > < % ELSE%> <% end if%>

转载请注明原文地址:https://www.9cbs.com/read-97157.html

New Post(0)