知识库

表单对象textarea内容的格式控制方法

来源: 本站    类别: 知识库    日期: 2014/2/6

 

<!--1.htm-->

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>

<body>
<form name="form1" method="post" action="t.asp">
  <p>
    <textarea name="textarea" cols="50" rows="10"></textarea>
  </p>
  <p>    <input type="submit" name="Submit" value="提交">
    <input type="reset" name="Submit2" value="重置">
    </p>
</form>
</body>
</html>

<!--t.asp-->

<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>

<body>
<%
dim msg
msg=request.Form("textarea")
msg=replace(msg,vbcrlf,"<br>")
msg=replace(msg," "," ")
response.write msg
%>

</body>
</html>


相关文章


Copyright © 2004 - 2024 CNHWW Inc. All Rights Reserved
石家庄市征红网络科技有限公司版权所有 邮政编码:050051
服务电话:0311-85315152 13931185013 在线客服QQ:81447932 / 81447933 邮箱: cnhww@163.com