textarea中有换行的文字,如何把该段文字照原来格式在别的页面的textarea中输出?

CFree 2001-11-19 05:23:34
textarea是用form提交的
谢谢!
...全文
118 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
CFree 2001-11-20
  • 打赏
  • 举报
回复
karma(无为):多谢!
现在结不了,请稍等。
karma 2001-11-19
  • 打赏
  • 举报
回复
try

location.href="testasp.asp?text="+escape(ptext);
karma 2001-11-19
  • 打赏
  • 举报
回复
1.location.href="next.asp?text="+ptext;
^^^^
2.text=request("next")
^^^^
CFree 2001-11-19
  • 打赏
  • 举报
回复
再补充一下,
代码中的form应为:
<form name="UploadForm" enctype="multipart/form-data" method="post" action="theother.asp">
所以不能用该form提交textarea
CFree 2001-11-19
  • 打赏
  • 举报
回复
karma(无为),不好意思,我弄错了,更正如下:
function func()
{
var ptext;
ptext=document.myform.t1.value;
location.href="next.asp?text="+ptext;
}
...
<form method="post" action="next.asp" name="myform">
<textarea name="t1"></textarea>
<input type="button" onClick="func()">
</form>
...
in next.asp:
<%
text=request("next")
%>
<textarea name="t2">
<%=text%>
</textarea>
karma 2001-11-19
  • 打赏
  • 举报
回复
Response.write Request("firsttextarea")
gives you a different output? weird, did you set the properties of the other textarea same as the previous one?
CFree 2001-11-19
  • 打赏
  • 举报
回复
别的页面的textarea的内容是用ASP的request("firsttextarea")得到的,并用response.write写出的。

87,996

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧