在asp里面怎么动态的统计textarea里面输入的文字!
在asp里面怎么动态的统计textarea里面输入的文字!
ps:怎么把同一个网站中的文字表单中的内容在同一个网站中的另一个文字表单中显示出来。
谢谢各位乐于助人的高手了。
问题点数:0、回复次数:7Top
1 楼ruoxuwu(若虚无)回复于 2004-08-03 00:14:04 得分 0
哇!不清楚,问一下你这么做要干什么啊?Top
2 楼mjpclab(有只大猫猫 mjpclab.net)回复于 2004-08-03 00:23:57 得分 0
1, onpropertychange事件里返回this.value.length
2, 只要吧该表单向另一页面提交,然后显示Top
3 楼blueice2002(蓝冰)回复于 2004-08-03 08:50:23 得分 0
onchangeTop
4 楼Aimar168(跟着微软走,牵着太阳的手)回复于 2004-08-03 09:15:07 得分 0
<SCRIPT LANGUAGE="JavaScript">
<!--
function textCounter(field, countfield) {
countfield.value = field.value.length;
}
</script>
<input type="text" name="mobile" size=70 onKeyDown="textCounte(this.form.mobile,this.form.remLen);" onKeyUp="textCounter(this.form.mobile,this.form.remLen);">
<input readonly type="text" name="remLen" size="2" maxlength="2" value="">Top
5 楼Aimar168(跟着微软走,牵着太阳的手)回复于 2004-08-03 09:18:07 得分 0
<input name="mobile">是输入内容的文本框,也可换成textarea
<input name="remlen">是显示几个字的文本框Top
6 楼iuhxq(小灰)回复于 2004-08-03 09:23:25 得分 0
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--#include file="chklogin.asp"-->
<!--#include file="conn_sms.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>群发短信</title>
<script language="JavaScript">
<!--
function checkMaxInput(form)
{
imax = form.msgBody.value.length;
form.count.value = imax;
if( imax>70)
form.msgBody.value=form.msgBody.value.substring(0,70);
}
function sel(theform)
{
var temp,FeeSevID,ywmc,SrcPhone,FeeCode,FeeType,Service;
temp="YXS,18030,181200,1681,1682,TL50,WEB10,0";
FeeSevID=temp.split(",");
temp="天运神喻,足彩专家建议,足彩临场推介,游戏大观园100点,游戏大观园200点,图片铃声下载,网站在线发短信,免费";
ywmc=temp.split(",");
temp="878801,8788,8788,878808,878808,8788,8788,8788";
SrcPhone=temp.split(",");
temp="50,30,200,100,200,50,10,0";
FeeCode=temp.split(",");
temp="2,2,2,2,2,2,2,1";
FeeType=temp.split(",");
temp="1,1,1,1,1,1,1,0";
Service=temp.split(",");
var i;
for (i=0;i<8;i++)
{
if ( theform.FeeSevID.value == FeeSevID[i] )
{
theform.ywmc.value=ywmc[i];
theform.SrcPhone.value=SrcPhone[i];
theform.FeeCode.value=FeeCode[i];
theform.FeeType.value=FeeType[i];
theform.Service.value=Service[i];
}
}
}
//-->
</script>
<link href="style.css" rel="stylesheet" type="text/css">
</head>
<body>
<%
if request.QueryString("action")="save" then
response.Write("<script>alert('发送成功');</script>")
end if
%>
<table width="768" border="0" align="center">
<form name="form" method="post" action="sendall.asp?action=save">
<tr>
<td width="142">接收手机号码<br>
多个号码之间用回车换行</td>
<td width="348"><textarea name="telephone" cols="50" rows="6" wrap="VIRTUAL" id="telephone"><%= telephone%></textarea>
</td>
</tr>
<tr>
<td valign="top">消息内容:<br>
(不超过70个字) <br>
已输入字符数:
<INPUT NAME="count" TYPE="text" size="3" readonly>
</td>
<td><textarea name="msgBody" cols="50" rows="6" wrap="VIRTUAL" onKeyDown="checkMaxInput(this.form)" onKeyUp="checkMaxInput(this.form)"></textarea></td>
</tr>
<tr>
<td valign="top"> </td>
<td> </td>
</tr>
<tr>
<td valign="top"> </td>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>业务代码:
<select name="FeeSevID" id="FeeSevID" onChange="sel(this.form)">
<option value="0" selected>免费</option>
<option value="YXS">YXS</option>
<option value="18030">18030</option>
<option value="181200">181200</option>
<option value="1681">1681</option>
<option value="1682">1682</option>
<option value="TL50">TL50</option>
<option value="WEB10">WEB10</option>
</select>
<input name="Service" type="hidden" id="Service" value="0">
<input name="FeeType" type="hidden" id="FeeType" value="1"></td>
<td>业务名称:
<input name="ywmc" type="text" id="ywmc" value="免费" size="20" readonly="true"></td>
</tr>
<tr>
<td>发送端口:
<input name="SrcPhone" type="text" id="SrcPhone" value="8788" size="6" maxlength="6"></td>
<td>资 费:
<input name="FeeCode" type="text" id="FeeCode" value="0" size="4" readonly="true">
分</td>
</tr>
</table>
</td>
</tr>
<tr>
<td valign="top"> </td>
<td> </td>
</tr>
<tr>
<td colspan="2"><div align="center">
<input type="submit" name="Submit" value="发送">
<input type="button" name="Submit2" value="返回" onClick="document.location='main.asp'">
</div></td>
</tr>
</form>
</table>
<br>
</body>
</html>
Top
7 楼look4sword(觅剑 | 劈柴、喂马、周游世界。)回复于 2004-08-03 10:31:01 得分 0
用JS的onchanged就可以了啊.Top




