上一篇:召集Button Event >>
Displaying All of the Form Variables
Sub FormDataDump(bolShowOutput, bolEndPageExecution)
These two input parameters are Boolean values. bolShowOutput, if True, will dump out the form field names and values for all to see. This has the effect of making your HTML page uglier and harder to read - therefore, if you are testing on a live site, you should set this value to False, in which case the form field names and values will be outputted inside of an HTML comment tag (<!-- form field names and values -->), so that they can only be seen via a View/Source.
The second parameter, bolEndPageExecution, determines whether or not a Response.End is issued in the FormDataDump() function. Response.End, if issued, ends the processing of the ASP page.
Below you will find the complete code for the FormDataDump() function.
Sub FormDataDump(bolShowOutput, bolEndPageExecution)
Dim sItem
@#What linebreak character do we need to use?
Dim strLineBreak
If bolShowOutput then
@#We are showing the output, so set the line break character
@#to the HTML line breaking character
strLineBreak = "<br>"
Else
@#We are nesting the data dump in an HTML comment block, so
@#use the carraige return instead of <br>
@#Also start the HTML comment block
strLineBreak = vbCrLf
Response.Write("<!--" & strLineBreak)
End If
@#Display the Request.Form collection
Response.Write("DISPLAYING REQUEST.FORM COLLECTION" & strLineBreak)
For Each sItem In Request.Form
Response.Write(sItem)
Response.Write(" - [" & Request.Form(sItem) & "]" & strLineBreak)
Next
@#Display the Request.QueryString collection
Response.Write(strLineBreak & strLineBreak)
Response.Write("DISPLAYING REQUEST.QUERYSTRING COLLECTION" & strLineBreak)
For Each sItem In Request.QueryString
Response.Write(sItem)
Response.Write(" - [" & Request.QueryString(sItem) & "]" & strLineBreak)
Next
@#If we are wanting to hide the output, display the closing
@#HTML comment tag
If Not bolShowOutput then Response.Write(strLineBreak & "-->")
@#End page execution if needed
If bolEndPageExecution then Response.End
End Sub
That@#s it! To call the function, simply use:
Call FormDataDump(TrueOrFalse, TrueOrFalse)
下一篇:有趣的javascript程序:抓不到我! >>
相关文章:
- · 非常好的东西,有助于学习css虑镜,转msdn [1]
- · 非常好的东西,有助于学习css虑镜,转msdn [2]
- · 经常看见有人问能不能实现这个效果:下拉选框中输入文字。想实现的进来看看
- · 非常好的东西,有助于学习css虑镜,转msdn [3]
- · 做一个酷酷的在线编辑器(-)
- · 做一个酷酷的在线编辑器(二)
- · 在《INPUT TYPE=“FILE”》里单击打开的浏览文件时,可以只显示JPG和GIF文件吗?
- · 怎么在html中include 一个文件内容!
- · How to Build Tables Dynamically(二)
- · How to Build Tables Dynamically(-)
- · 关于Window.open的参数小结(参书改编)
- · 试试看这个,可能和你的要求不一样,但是可是实现一样的功能
- · string.substring();
- · 如何使用MsgBox?
- · js中,有什么函数可以令数字每千位就加一“,”,还有什么函数可以保留小数后两位
- · 重写表格--[js源码]你如果用的上,这就是好东西.
- · -3
- · -2
- · 下拉连动的例子,自己看看,修改一下。
- · 这是newuser.asp(注册)
- · 编写跨浏览器的DHTML应用程序。大家可以去www.dicp.ac.cn看看这个对ie和ns都适用的下拉菜单
- · Iframe的妙用!
- · 让表格闪起来的技巧
- · Label 标识的妙用(转)
- · 通过地址栏传递参数.通过url传递参数(原创 是我给一个网友解决问题时写的)
- · 利用JS在页面上动态生成直线
- · 一般的复选框一定要按在复选框上才能被选中,这个复选框点击相应的文字就可以被选中
- · 利用JS动态改变图片大小
- · event对象详解
- · 关于AutoComplete(文本框的自动填充)
- · 在页面上定义元件热键的方法
- · window.external的使用
- · 利用HTC技术限制多行输入框的内容的长度(转载)
- · “画中画”效果---谈Iframe标记的使用
- · COOKIE欺骗 (转贴)
- · 当页面正在被下载时在页面上显示loading.....的例子
- · 使用javascript改进你的框架 (摘)
- · 这是我在网上摘入的,贴上来与大家一起学习学习。 在javascript中应用Object(1)
