July 2010 万年历 Su M Tu W Th F Sa 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 < MONTH > < YEAR >
Information
Name:戴一波 (cnbruce ) Location:扬州@中国 MSN:cnbruce#msn.com Total Diary:1095 Reviews:7290 Members:49573
Hot link
+ Dreamweaver教程
+ 扬州分类信息网
+ 音乐前线播报
+ 泰兴人才网
+ 毛绒玩具批发
常去之地……
CSDN
MSDN
Builder
IBM-DW
Mozilla
cnblogs
asp.net
phpchina
派代网
艾瑞网
cnbeta
donews
techweb
落伍者
sitepoint
Blue!dea
W3CBBS
51js
M$BBS
Flash8
Ultrashock
荐读: ASP ,Web标准 ,PHP ,用户体验 ,AJAX ,《DW》书 ,DW2ASP ,JSP ,C#.Net
本日志标题:一些简单的ASP练习   [2004-3-20]
1,练习使用request对象接受数据,并且综合运用些函数。 cnbruce.html<form action="cnbruce.asp" method="post"> <input type="text" name="title"><br> <textarea name="content" rows=10 cols=20></textarea><br> <input type="submit"> </form>
cnbruce.asp<% function th(str) str=replace(str,"妈的","MD") str=replace(str,"靠","KAO") th=str end function function encode(str) str = replace(str, ">", ">") str = replace(str, "<", "<") str = Replace(str, CHR(32), " ") str = Replace(str, CHR(13), "") str = Replace(str, CHR(10) & CHR(10), "</P><P>") str = Replace(str, CHR(10), "<BR>") encode=str end function %> <%title=request.form("title") content=request.form("content")%> 文章标题:<%=th(title)%><hr> 文章内容:<%=encode(th(content))%>
th(str)为自定义函数,主要功能很简单:过滤字符。encode(str)也为自定义函数,主要功能是完整地显示被传递的信息。 CHR(10)表示换行,CHR(13)表示回车,CHR(32)表示空格。 附加功能:显示UBB代码。 即ubb.asp中含有ubb()函数。 增强的cnbruce.asp<!--#include file="http://www.cnbruce.com/blog/ubb.asp"--> <% function th(str) str=replace(str,"妈的","MD") str=replace(str,"靠","KAO") th=str end function %> <script> function runEx(cod1) { cod=document.all(cod1) var code=cod.value; if (code!=""){ var newwin=window.open('','',''); newwin.opener = null newwin.document.write(code); newwin.document.close(); } } </script> <%title=request.form("title") content=request.form("content")%> 文章标题:<%=th(title)%><hr> 文章内容:<%=ubb(unhtml(th(content)))%>
[Edit on 2004-12-27 0:22:15 By cnbruce]
在百度搜索完整的一些简单的ASP练习 内容,或者用Google搜索相关的更多内容
About Comments
, 版主想请教:: 页面左上的日期图及动态的ASP连接是如何实现的??? 很漂亮,, 不胜感谢!By [wuyeah ] at 2004-3-20 18:16:07
ghjkhjk' hjkhjkBy [uiui ] at 2005-7-13 17:34:17