写什么代码能获取20个中文字?

这个是输出留言的代码<%=(Recordset1.Fields.Item("neirong").Value)%>
在留言那里我想每个留言只显示15个中文字
那代码应该怎么写?
还是不行

这是网页的代码...那位高手来看看!!
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="Connections/connzy.asp" -->
<%
Dim Recordset1
Dim Recordset1_numRows

Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_connzy_STRING
Recordset1.Source = "SELECT * FROM liuyan ORDER BY LYID DESC"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()

Recordset1_numRows = 0
%>
<%
Dim Recordset2
Dim Recordset2_numRows

Set Recordset2 = Server.CreateObject("ADODB.Recordset")
Recordset2.ActiveConnection = MM_connzy_STRING
Recordset2.Source = "SELECT * FROM rizhi ORDER BY rizhiID DESC"
Recordset2.CursorType = 0
Recordset2.CursorLocation = 2
Recordset2.LockType = 1
Recordset2.Open()

Recordset2_numRows = 0
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index

Repeat1__numRows = 4
Repeat1__index = 0
Recordset1_numRows = Recordset1_numRows + Repeat1__numRows
%>
<%
Dim Repeat2__numRows
Dim Repeat2__index

Repeat2__numRows = 6
Repeat2__index = 0
Recordset2_numRows = Recordset2_numRows + Repeat2__numRows
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>冫尐丶 虫文</title>
<style type="text/css">
<!--
body,td,th {
font-size: 12px;
color: #000000;
}
body {
background-image: url(img/beijing.jpg);
background-repeat: no-repeat;
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
background-color: #000000;
}
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
a:active {
text-decoration: none;
}
.STYLE15 {color: #CCCCCC; font-size: 12px; }
.STYLE17 {color: #CCCCCC}
.STYLE18 {color: #FFFF00}
.STYLE22 {color: #FFFFFF; font-size: 12px; }
.STYLE23 {color: #FFFFFF}
.STYLE26 {color: #00FFFF}
.STYLE28 {color: #FF00FF}
.STYLE29 {color: #8C558C}
.STYLE30 {color: #8F2E55}
.STYLE32 {color: #993C57}
.STYLE33 {color: #7B336F}
.STYLE34 {color: #884A7E}
-->
</style></head>

<body>
<table width="1024" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="767" align="center" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="left" valign="top"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="1024" height="125" >
<param name="movie" value="~baner.swf" />
<param name="quality" value="high" />
<param name="wmode" value="transparent" />

<embed src="~baner.swf" width="1024" height="125" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent"></embed>
</object></td>
</tr>

</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="347" rowspan="3" align="center" valign="top"><table width="347" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="24" colspan="2" align="left" valign="middle" background="img/btbj.jpg"><span class="STYLE22">关 于 我</span></td>
</tr>
<tr>
<td width="143" height="142"><table width="100%" border="1" cellspacing="0" cellpadding="0">
<tr>
<td><img src="img/wo.jpg" width="139" height="140" /></td>
</tr>
</table></td>
<td width="204" align="left" valign="top"><p class="STYLE17">      <br />
      <span class="STYLE18">  冫尐丶 虫文</span><br />
 <span class="STYLE33">      19岁  天秤座<br />
       现居广东  广州<br />
<br />
<br />
   自我介绍--再沉默`中沉默 <br />
<br />
   近期心愿--很多很多``</span><br />
</p></td>
</tr>
<tr>
<td height="302" colspan="2" align="center"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="300" height="320">
<param name="movie" value="mp3player.swf" />
<param name="quality" value="high" />
<param name="wmode" value="transparent" />
<embed src="mp3player.swf" width="300" height="320" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent"></embed>
</object></td>
</tr>
</table></td>
<td width="330" rowspan="3" align="center" valign="top"><table width="330" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="24" align="left" valign="middle" background="img/btbj.jpg"><span class="STYLE22">日 志</span></td>
</tr>
<tr>
<td height="465" align="right" valign="top"><br />
<%
While ((Repeat2__numRows <> 0) AND (NOT Recordset2.EOF))
%>
<table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="36" align="left" valign="top" class="STYLE28"><span class="STYLE29"><%=(Recordset2.Fields.Item("title").Value)%></span><br />
           <br />           <span class="STYLE30"><%=(Recordset2.Fields.Item("nr").Value)%></span><br />
<br />
                        <span class="STYLE17">     <%=(Recordset2.Fields.Item("rizhitime").Value)%></span> </td>
</tr>
</table>
<%
Repeat2__index=Repeat2__index+1
Repeat2__numRows=Repeat2__numRows-1
Recordset2.MoveNext()
Wend
%>
<span class="STYLE28"><br />
<a href="rizhi.asp">更多...</a></span></td>
</tr>
</table></td>
<td width="347" height="24" align="left" valign="middle" background="img/btbj.jpg"><span class="STYLE23">  相 册</span></td>
</tr>
<tr>
<td height="217" align="left" valign="top"> </td>
</tr>
<tr>
<td width="347" height="273" align="left" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="1%" height="24"> </td>
<td width="97%" align="left" valign="middle" background="img/btbj.jpg"><span class="STYLE23"> 最 新 留 言</span></td>
</tr>
<tr>
<td height="245" colspan="2" align="right" valign="top"><%
While ((Repeat1__numRows <> 0) AND (NOT Recordset1.EOF))
%>
<table width="90%" border="0" align="center" cellpadding="0" cellspacing="0" bordercolor="#666666">
<tr>
<td height="20" colspan="2" align="left" valign="middle"><span class="STYLE34"><%=(Recordset1.Fields.Item("liuyanren").Value)%>:</span></td>
</tr>
<tr>
<td width="259" height="20" align="left" valign="middle"><blockquote>
<p><span class="STYLE32">
<%=(Recordset1.Fields.Item("neirong").Value)%>
</span></p>
</blockquote></td>
<td width="50" align="center" valign="middle"> </td>
</tr>
</table>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
Recordset1.MoveNext()
Wend
%>
<br />
<span class="STYLE26"><a href="liuyan.asp">更多...</a></span></td>
</tr>
</table></td>
</tr>
</table>
<table width="1024" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="129" align="center" valign="bottom"><table width="300" border="0" align="right" cellpadding="0" cellspacing="0">
<tr>
<td align="center"><span class="STYLE15">QQ:152751997</span></td>
</tr>
<tr>
<td align="center"><span class="STYLE15">E-mail:[email protected]</span></td>
</tr>
<tr>
<td align="center"><span class="STYLE15">版权所有:冫尐丶虫文   1989-2010</span></td>
</tr>
<tr>
<td align="center"><span class="STYLE15">ICP证粤H2-19890925</span></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>
<%
Recordset1.Close()
Set Recordset1 = Nothing
%>
<%
Recordset2.Close()
Set Recordset2 = Nothing
%>
温馨提示:答案为网友推荐,仅供参考
第1个回答  2008-12-31
<%
If Len(Recordset1.Fields.Item("neirong").Value) > 15 Then
Response.Write Left((Recordset1.Fields.Item("neirong").Value), 12) & "..."
Else
Response.Write (Recordset1.Fields.Item("neirong").Value)
End If
%>本回答被网友采纳
第2个回答  2008-12-31
<%=left(Recordset1.Fields.Item("neirong").Value),30%>
试一下!
第3个回答  2008-12-31
用LEFT函数
相似回答
大家正在搜