HTML ASP VBSCRIPT JAVASCRIPT SKILLS 常见问题

1.如何 最小化、最大化、关闭窗口
答:<objectid=hh1classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11">
<paramname="command"value="minimize"></object>
<objectid=hh2classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11">
<paramname="command"value="maximize"></object>
<objectid=hh3classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11">
<paramname="command"value="close"></object>

<inputtype=buttonvalue=最小化οnclick=hh1.click()>
<inputtype=buttonvalue=最大化οnclick=hh2.click()>
<inputtype=buttonvalue=关闭οnclick=hh3.click()>

2.如何静止页面缓存
答:htm网页
<metahttp-equiv="pragma"content="no-cache">
<metahttp-equiv="cache-control"content="no-cache,must-revalidate">
<metahttp-equiv="expires"content="wed,26feb199708:21:57gmt">
或者<metahttp-equiv="expires"content="0">
asp网页
response.expires=-1
response.expiresabsolute=now()-1
response.cachecontrol="no-cache"
php网页
header("expires:mon,26jul199705:00:00gmt");
header("cache-control:no-cache,must-revalidate");
header("pragma:no-cache");

3.如何检查一段字符串是否全由数字组成
<scriptlanguage="javascript"><!--
functionchecknum(str){returnstr.match(//d/)==null}
alert(checknum("1232142141"))
alert(checknum("123214214a1"))
//--></script>

4.如何获取机器信息
答本机ip<%=request.servervariables("remote_addr")%>
服务器名<%=request.servervariables("server_name")%>
服务器ip<%=request.servervariables("local_addr")%>
服务器端口<%=request.servervariables("server_port")%>
服务器时间<%=now%>
iis版本<%=request.servervariables"server_software")%>
脚本超时时间<%=server.scripttimeout%>
本文件路径<%=server.mappath(request.servervariables("script_name"))%>
服务器cpu数量<%=request.servervariables("number_of_processors")%>
服务器解译引擎<%=scriptengine&"/" & scriptenginemajorversion &"." & scriptengineminorversion & "." & scriptenginebuildversion%>
服务器操作系统<%=request.servervariables("os")%>
---------------------------------------------------
1.如何让日期相减
日期减去天数等于第二个日期
<scriptlanguage=javascript>
functioncc(dd,dadd)
{
//可以加上错误处理
vard=newdate(dd.replace("-","/"))
d.setdate(d.getdate()+dadd)
alert(d.getfullyear()+"年"+(d.getmonth()+1)+"月"+d.getdate()+"日")
}
cc("2002-2-28",2)
</script>
---------------------------------------------------
1.怎样通过asp的手段来检查来访者是否用了代理
<%ifrequest.servervariables("http_x_forwarded_for")<>""then
response.write"<fontcolor=#ff0000>您通过了代理服务器,"&_
"真实的ip为"&request.servervariables("http_x_forwarded_for")
endif
%>
分类:    错误及常见错误代码
问题描述: 网页错误,无法显示。
解决办法:

1) 服务器端配置 iis 中 “允许客户端调试”,“发送具体的asp 错误"
2) 客户端 ie -> 工具 -> Internet 选项 -> 高级 -> 把 "显示友好http 错误”这个选项去掉
这样就能看到错误信息了。
获得窗口的大小
document.body.clientWidth,document.body.clientHeight
document.body.offsetWidth,document.body.offsetHeight
判断一个表是否存在:
if exists (select * from dbo.sysobjects where id = object_id('表名') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table 表名
GO
从publish 表中取出第 n 条到第 m 条的记录: 
SELECT TOP m-n+1 * 
FROM publish 
WHERE (id NOT IN 
     (SELECT TOP n-1 id 
     FROM publish)) 

id 为publish 表的关键字
http://www.tjhgc.com/xxrl.zip
分类:    js程序

1.如何实现连续滚动

<div id="marquees"><br/><br/>

数据里面读出来的<br/>
</div>

<script language="JavaScript">

marqueesHeight=200;
stopscroll=false;

with(marquees){
  style.width=0;
  style.height=marqueesHeight;
  style.overflowX="visible";
  style.overflowY="hidden";
  noWrap=true;
  οnmοuseοver=new Function("stopscroll=true");
  οnmοuseοut=new Function("stopscroll=false");
}
document.write('<div id="templayer" style="position:absolute;z-index:1;visibility:hidden"></div>');

preTop=0; currentTop=0; 

function init(){
  templayer.innerHTML="";
  while(templayer.offsetHeight<marqueesHeight){
    templayer.innerHTML+=marquees.innerHTML;
  }
  marquees.innerHTML=templayer.innerHTML+templayer.innerHTML;
  setInterval("scrollUp()",10);
}
document.body.οnlοad=init;

function scrollUp(){
  if(stopscroll==true) return;
  preTop=marquees.scrollTop;
  marquees.scrollTop+=1;
  if(preTop==marquees.scrollTop){
    marquees.scrollTop=templayer.offsetHeight-marqueesHeight;
    marquees.scrollTop+=1;
  }
}
</script>

只针对图片:

<form name=form1 οnsubmit="return mm()">
<input type=file name=meizz><br/>
<input type=submit value=submit></form>

<SCRIPT LANGUAGE="JavaScript"><!--
function mm()
{
  var s = document.form1.meizz.value;
  if(s=="")return false;
  var img = new Image();
  img.src = s;
  alert("高 = "+ img.height + "/n宽 = "+ img.width);
  alert("fileSize = "+ img.fileSize +" 字节");
  return(img.fileSize <= 40000);
}
//--></SCRIPT>
1. οncοntextmenu="window.event.returnvalue=false" 将彻底屏蔽鼠标右键
<table border οncοntextmenu=return(false)><td>no</table> 可用于Table

2. <body onselectstart="return false"> 取消选取、防止复制

3. οnpaste="return false" 不准粘贴

4. οncοpy="return false;" oncut="return false;" 防止复制

5. <link rel="Shortcut Icon" href="favicon.ico"> IE地址栏前换成自己的图标

6. <link rel="Bookmark" href="favicon.ico"> 可以在收藏夹中显示出你的图标

7. <input style="ime-mode:disabled"> 关闭输入法

8. 永远都会带着框架
<script language="javascript"><!--
if (window == top)top.location.href = "frames.htm"; //frames.htm为框架网页
// --></script>

9. 防止被人frame
<SCRIPT LANGUAGE=javascript><!-- 
if (top.location != self.location)top.location=self.location;
// --></SCRIPT>

10. <noscript><iframe src=*.html></iframe></noscript> 网页将不能被另存为

11. <input type=button value=查看网页源代码 
οnclick="window.location = 'view-source:'+ 'http://www.csdn.net/'">

12. 怎样通过asp的手段来检查来访者是否用了代理
<% if Request.ServerVariables("HTTP_X_FORWARDED_FOR")<>"" then
response.write "<font color=#FF0000>您通过了代理服务器,"& _
"真实的IP为"&Request.ServerVariables("HTTP_X_FORWARDED_FOR")
end if
%>

13. 取得控件的绝对位置

//javascript
<script language="javascript">
function getIE(e){
var t=e.offsetTop;
var l=e.offsetLeft;
while(e=e.offsetParent){
t+=e.offsetTop;
l+=e.offsetLeft;
}
alert("top="+t+"/nleft="+l);
}
</script>

//VBScript
<script language="VBScript"><!--
function getIE()
dim t,l,a,b
set a=document.all.img1
t=document.all.img1.offsetTop
l=document.all.img1.offsetLeft
while a.tagName<>"BODY"
set a = a.offsetParent
t=t+a.offsetTop
l=l+a.offsetLeft
wend
msgbox "top="&t&chr(13)&"left="&l,64,"得到控件的位置"
end function
--></script>

14. 光标是停在文本框文字的最后
<script language="javascript">
function cc()
{
var e = event.srcElement;
var r =e.createTextRange();
r.moveStart('character',e.value.length);
r.collapse(true);
r.select();
}
</script>
<input type=text name=text1 value="123" οnfοcus="cc()">

15. 判断上一页的来源
asp:
request.servervariables("HTTP_REFERER")

javascript:
document.referrer

16. 最小化、最大化、关闭窗口
<object id=hh1 classid="clsid:ADB880A6-D8FF-11CF-9377-00AA003B7A11"> 
<param name="Command" value="Minimize"></object>
<object id=hh2 classid="clsid:ADB880A6-D8FF-11CF-9377-00AA003B7A11"> 
<param name="Command" value="Maximize"></object>
<OBJECT id=hh3 classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11">
<PARAM NAME="Command" value="Close"></OBJECT>

<input type=button value=最小化 οnclick=hh1.Click()>
<input type=button value=最大化 οnclick=hh2.Click()>
<input type=button value=关闭 οnclick=hh3.Click()>
本例适用于IE

17. 
<%
'定义数据库连接的一些常量
Const adOpenForwardOnly = 0 '游标只向前浏览记录,不支持分页、Recordset、BookMark
Const adOpenKeyset = 1 '键集游标,其他用户对记录说做的修改将反映到记录集中,但其他用户增加或删除记录不会反映到记录集中。支持分页、Recordset、BookMark
Const adOpenDynamic = 2 '动态游标功能最强,但耗资源也最多。用户对记录说做的修改,增加或删除记录都将反映到记录集中。支持全功能浏览(ACCESS不支持)。
Const adOpenStatic = 3 '静态游标,只是数据的一个快照,用户对记录说做的修改,增加或删除记录都不会反映到记录集中。支持向前或向后移动

Const adLockReadOnly = 1 '锁定类型,默认的,只读,不能作任何修改
Const adLockPessimistic = 2 '当编辑时立即锁定记录,最安全的方式
Const adLockOptimistic = 3 '只有在调用Update方法时才锁定记录集,而在此前的其他操作仍可对当前记录进行更改、插入和删除等
Const adLockBatchOptimistic = 4 '当编辑时记录不会被锁定,而更改、插入和删除是在批处理方式下完成的

Const adCmdText = &H0001
Const adCmdTable = &H0002
%>

18. 网页不会被缓存
HTM网页
<META HTTP-EQUIV="pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache, must-revalidate">
<META HTTP-EQUIV="expires" CONTENT="Wed, 26 Feb 1997 08:21:57 GMT">
或者<META HTTP-EQUIV="expires" CONTENT="0">
ASP网页
Response.Expires = -1
Response.ExpiresAbsolute = Now() - 1
Response.cachecontrol = "no-cache"
PHP网页
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");

19. 检查一段字符串是否全由数字组成
<script language="javascript"><!--
function checkNum(str){return str.match(//D/)==null}
alert(checkNum("1232142141"))
alert(checkNum("123214214a1"))
// --></script>

20. 获得一个窗口的大小
document.body.clientWidth,document.body.clientHeight

21. 怎么判断是否是字符
if (/[^/x00-/xff]/g.test(s)) alert("含有汉字");
else alert("全是字符");

22.TEXTAREA自适应文字行数的多少
<textarea rows=1 name=s1 cols=27 onpropertychange="this.style.posHeight=this.scrollHeight">
</textarea>

23. 日期减去天数等于第二个日期
<script language=javascript>
function cc(dd,dadd)
{
//可以加上错误处理
var a = new Date(dd)
a = a.valueOf()
a = a - dadd * 24 * 60 * 60 * 1000
a = new Date(a)
alert(a.getFullYear() + "年" + (a.getMonth() + 1) + "月" + a.getDate() + "日")
}
cc("12/23/2002",2)
</script>

24. 选择了哪一个Radio
<HTML><script language="vbscript">
function checkme()
for each ob in radio1
if ob.checked then window.alert ob.value
next
end function
</script><BODY>
<INPUT name="radio1" type="radio" value="style" checked>Style
<INPUT name="radio1" type="radio" value="barcode">Barcode
<INPUT type="button" value="check" οnclick="checkme()">
</BODY></HTML>

25.获得本页url的request.servervariables("")集合
Response.Write "<TABLE border=1><!-- Table Header --><TR><TD><B>Variables</B></TD><TD><B>value</B></TD></TR>"
for each ob in Request.ServerVariables
Response.Write "<TR><TD>"&ob&"</TD><TD>"&Request.ServerVariables(ob)&"</TD></TR>"
next
Response.Write "</TABLE>"

26.
本机ip<%=request.servervariables("remote_addr")%>
服务器名<%=Request.ServerVariables("SERVER_NAME")%>
服务器IP<%=Request.ServerVariables("LOCAL_ADDR")%>
服务器端口<%=Request.ServerVariables("SERVER_PORT")%>
服务器时间<%=now%>
IIS版本<%=Request.ServerVariables"SERVER_SOFTWARE")%>
脚本超时时间<%=Server.ScriptTimeout%>
本文件路径<%=server.mappath(Request.ServerVariables("SCRIPT_NAME"))%>
服务器CPU数量<%=Request.ServerVariables("NUMBER_OF_PROCESSORS")%>
服务器解译引擎<%=ScriptEngine & "/"& ScriptEngineMajorVersion &"."&ScriptEngineMinorVersion&"."& ScriptEngineBuildVersion %>
服务器操作系统<%=Request.ServerVariables("OS")%>

27.ENTER键可以让光标移到下一个输入框
<input οnkeydοwn="if(event.keyCode==13)event.keyCode=9">

28. 检测某个网站的链接速度:
把如下代码加入<body>区域中:
<script language=javascript>
tim=1
setInterval("tim++",100)
b=1

var autourl=new Array()
autourl[1]="www.njcatv.net"
autourl[2]="javacool.3322.net"
autourl[3]="www.sina.com.cn"
autourl[4]="www.nuaa.edu.cn"
autourl[5]="www.cctv.com"

function butt(){
document.write("<form name=autof>")
for(var i=1;i<autourl.length;i++)
document.write("<input type=text name=txt"+i+" size=10 value=测试中……> =》<input type=text name=url"+i+" size=40> =》<input type=button value=GO οnclick=window.open(this.form.url"+i+".value)><br/>")
document.write("<input type=submit value=刷新></form>")
}
butt()
function auto(url){
document.forms[0]["url"+b].value=url
if(tim>200)
{document.forms[0]["txt"+b].value="链接超时"}
else
{document.forms[0]["txt"+b].value="时间"+tim/10+"秒"}
b++
}
function run(){for(var i=1;i<autourl.length;i++)document.write("<img src=http://"+autourl[i]+"/"+Math.random()+" width=1 height=1 οnerrοr=auto('http://";+autourl[i]+"')>")}
run()</script>

29. 各种样式的光标
auto :标准光标
default :标准箭头
hand :手形光标
wait :等待光标
text :I形光标
vertical-text :水平I形光标
no-drop :不可拖动光标
not-allowed :无效光标
help :?帮助光标
all-scroll :三角方向标
move :移动标
crosshair :十字标
e-resize
n-resize
nw-resize
w-resize
s-resize
se-resize
sw-resize

键盘触发事件
http://expert.csdn.net/Expert/topic/1465/1465399.xml?temp=.3390619
SQL 攻击
http://expert.csdn.net/Expert/topic/1498/1498450.xml?temp=.5907099
outerHTML and innerHTML
http://expert.csdn.net/Expert/topic/1627/1627154.xml?temp=.2553369
列表框间选项间移动的脚本
http://expert.csdn.net/Expert/topic/2142/2142148.xml?temp=1.272219E-02
限制只能输入数字和小数点
http://expert.csdn.net/Expert/topic/2293/2293880.xml?temp=.387417
无组件上传类
http://expert.csdn.net/Expert/topic/1348/1348149.xml?temp=.7916529
日历控件
http://expert.csdn.net/Expert/topic/1473/1473298.xml?temp=.1580011
如何调用[文件另存为... ]对话框?
http://expert.csdn.net/Expert/topic/1492/1492264.xml?temp=.4600031
一个我刚刚学习asp时候天天看,天天学的例子,学了好长时间才精通这个程序
http://www.codeproject.com/asp/ute/ute_301.zip
介绍在:
http://www.codeproject.com/asp/ute.asp

一个我刚刚学习asp写日历程序时候的经典例子,也学习了2天,感觉很好
http://www.codeproject.com/asp/ezevents/EzEvents_src.zip
介绍在:
http://www.codeproject.com/asp/ezevents.asp
一句话:老外玩模块化编程就是牛,玩面向对象也是牛!而我!水牛!

收藏中...................................
俺也来个
图片显示控制:
<script language="JavaScript">
<!--
var flag=false;
function DrawImage(ImgD){
   var image=new Image();
   image.src=ImgD.src;
   if(image.width>0 && image.height>0){
    flag=true;
    if(image.width/image.height>= 360/270){
     if(image.width>360){  
     ImgD.width=360;
     ImgD.height=(image.height*360)/image.width;
     }else{
     ImgD.width=image.width;  
     ImgD.height=image.height;
     }
     ImgD.alt=image.width+"×"+image.height;
     }
    else{
     if(image.height>270){  
     ImgD.height=270;
     ImgD.width=(image.width*270)/image.height;     
     }else{
     ImgD.width=image.width;  
     ImgD.height=image.height;
     }
     ImgD.alt=image.width+"×"+image.height;
     }
    }
} 
//-->
</script>



调用格式:
<img src="a.gif" οnlοad="javascript:DrawImage(this);"
用asp把doc转换成html
doc2html.vbs

'**********************************************************
'
'    调用方法:doc2html c:/doc2html c:/doc2html
'    调用方法:doc2html -s c:/doc2html/a.doc c:/doc2html
'
'**********************************************************

Dim Objword
Dim Objdoc
Dim Objfso
Dim Strsource
Dim Strtarget
Dim Bbatch

'得到命令行参数,有三种可能的格式:[-s] 要进行转换的源文件目录或文件 转换成Html文件后保存的目录
Function Getparams()
Dim Objarg
     If Wscript.Arguments.Count >= 2 Then
          If  Wscript.Arguments.Item(0) = "-s" Or Wscript.Arguments.Item(0) = "-S" Then
               Strsource = Wscript.Arguments.Item(1)
               Strtarget = Wscript.Arguments.Item(2)
               Bbatch = False
          Else
               Strsource = Wscript.Arguments.Item(0)
               Strtarget = Wscript.Arguments.Item(1)
               Bbatch = True
          End If
     Else
          Wscript.Quit(1)
     End If
End Function

Function Batchprocessing()
Dim Objfolder
Dim Objfile
Dim Lpos
Dim Strfilename
     Lpos = 0
     Set Objfolder = Objfso.Getfolder(Strsource)
     For Each Objfile In Objfolder.Files
          Lpos = Instr(1,Mid(Objfile.Path,Len(Objfile.Path) - 3,4),"Doc",1)
          If Lpos > 0 Then
               Strfilename = Objfso.Getbasename(Objfile.Path)
               Wordinterface Objfile.Path,Strfilename
          End If
     Next
End Function


Function Singleprocessing()
Dim Objfile
     Set Objfile = Objfso.Getfile(Strsource)
     Strfilename = Objfso.Getbasename(Objfile.Path)
     Wordinterface Objfile.Path,Strfilename
End Function

Function Wordinterface(Strfilename,Formattedfilename)
     Objword.Documents.Open Strfilename
     Set Objdoc = Objword.Activedocument
     'Stop
     'set The Title Of The Document To Match The Filename
     Objdoc.Builtindocumentproperties(1) = Formattedfilename
     '1 = Wdpropertytitle In Vba

     Objdoc.Saveas Strtarget & "/" & Formattedfilename & ".htm",8
     'objdoc.Saveas "C:/Doc2Html/" & Formattedfilename & ".htm",8
     On Error Resume Next
     Objdoc.Close
End Function

'stop
Set Objfso = Createobject("Scripting.FileSystemObject")
Set Objword = Createobject("Word.Application")
Objword.Visible = False
Call Getparams

If Bbatch Then
     Call Batchprocessing
Else
     Call Singleprocessing
End If

Objword.Quit
Set Objword = Nothing

1.自己写的将小写金额换成大写

<%
'****人民币大小写转换格式****
dim str(9)
str(0)="零"
str(1)="壹"
str(2)="贰"
str(3)="叁"
str(4)="肆"
str(5)="伍"
str(6)="陆"
str(7)="柒"
str(8)="捌"
str(9)="玖"
aa=Request.form("source")
hh=formatnumber(aa,2,-1)
aa=replace(hh,".","")
aa=replace(aa,",","")
for i=1 to len(aa)
s=mid(aa,i,1)
mynum=str(s)
select case(len(aa)+1-i)
case 1: k= mynum&"分"
case 2: k= mynum&"角"
case 3: k= mynum&"元"
case 4: k= mynum&"拾"
case 5: k= mynum&"佰"
case 6: k= mynum&"仟"
case 7: k= mynum&"万"
case 8: k= mynum&"拾"
case 9: k= mynum&"佰"
case 10: k= mynum&"仟"
end select
m=m&k
next
%>


<html>
<head>
<title>数字转换</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<!--
Elseif(s=".") then
n=m
i=i+2
for j=i to len(aa)
s=mid(aa,i,1)
mynum=str(s)
select case(len(aa)+1-i)
case 1: p= mynum&"分"
case 2: p= mynum&"角"
end select
m=m&p
next
-->

<body bgcolor="#FFFFFF">
<form method="post" name="forma">
<input type="text" name="source" value="<%=hh%>">
=
<input type="text" name="result" value="<%=m%>" size="40">

<input type="submit" name="Submit" value="提交 " >
</form>
</body>
</html>

'获取中文字符串拼音首字母串的函数
<%
response.write "<link href=style.css rel=stylesheet>"
if request.form("content")="" then
response.write "<center><form method=post action=""""><input name=content type=text>__<input type=submit></form>"
else
function getpychar(char)
tmp=65536+asc(char)
if(tmp>=45217 and tmp<=45252) then
getpychar= "A"
elseif(tmp>=45253 and tmp<=45760) then
getpychar= "B"
elseif(tmp>=45761 and tmp<=46317) then
getpychar= "C"
elseif(tmp>=46318 and tmp<=46825) then
getpychar= "D"
elseif(tmp>=46826 and tmp<=47009) then
getpychar= "E"
elseif(tmp>=47010 and tmp<=47296) then
getpychar= "F"
elseif(tmp>=47297 and tmp<=47613) then
getpychar= "G"
elseif(tmp>=47614 and tmp<=48118) then
getpychar= "H"
elseif(tmp>=48119 and tmp<=49061) then
getpychar= "J"
elseif(tmp>=49062 and tmp<=49323) then
getpychar= "K"
elseif(tmp>=49324 and tmp<=49895) then
getpychar= "L"
elseif(tmp>=49896 and tmp<=50370) then
getpychar= "M"
elseif(tmp>=50371 and tmp<=50613) then
getpychar= "N"
elseif(tmp>=50614 and tmp<=50621) then
getpychar= "O"
elseif(tmp>=50622 and tmp<=50905) then
getpychar= "P"
elseif(tmp>=50906 and tmp<=51386) then
getpychar= "Q"
elseif(tmp>=51387 and tmp<=51445) then
getpychar= "R"
elseif(tmp>=51446 and tmp<=52217) then
getpychar= "S"
elseif(tmp>=52218 and tmp<=52697) then
getpychar= "T"
elseif(tmp>=52698 and tmp<=52979) then
getpychar= "W"
elseif(tmp>=52980 and tmp<=53640) then
getpychar= "X"
elseif(tmp>=53689 and tmp<=54480) then
getpychar= "Y"
elseif(tmp>=54481 and tmp<=62289) then
getpychar= "Z"
else '如果不是中文,则不处理
getpychar=char
end if
end function
function getpy(str)
for i=1 to len(str)
getpy=getpy&getpychar(mid(str,i,1))
next
end function
content=request.form("content")
response.write "<center>"&getpy(content)&chr(10)
response.write "<br><br><br><a href=# οnclick=javascript:history.go(-1)>返回</a>"
end if
%>

-----------------------------------------------
--------------------------------------------
ip限制函数
'******************************
'Function CheckIp(cInput_Ip,cBound_Ip)
'Created by qqdao, qqdao@263.net 2001/11/28
'说明:首先需要根据;号循环,然后判断是否含有"-",如果有则进行拆分处理,最后判断是否在范围内
'参数: cInput_Ip,代检查的ip
' cBound_Ip,给定的范围格式为,单个ip,和范围ip,范围ip最后使用”-“分割,如果是“*”则必须放到最后一位
'                每个范围后添加":ALLOW"表示允许登陆,添加":REFUSE"表示拒绝登陆。多个范围用”;“隔开
'                 例如192.168.1*.*:ALLOW;192.168.1.1:ALLOW;192.168.1.1-10:REFUSE"
'返回值: true/false
'更新:2001/12/05  支持ALLOW,REFUSE支持’*‘,不想对?支持,因为和*差不多
'******************************
function CheckIp(cInput_Ip,cBound_Ip)
dim cSingle_Ip,cTemp_IP,cStart_IP,cEnd_Ip
CheckIp = false
cSingle_Ip=split(cBound_Ip,";")
        for i=0 to ubound(cSingle_Ip)
            if Instr(cSingle_Ip(i),"REFUSE") <> 0 then    '就是拒绝了
                 cTemp_IP = left(cSingle_Ip(i),instr(cSingle_Ip(i),":")-1)
          
      if Instr(cTemp_IP,"*") <> 0 then  '是宽范围
          cStart_IP = left(cTemp_IP,instr(cTemp_IP,"*")-1)
          if left(cInput_Ip,len(cStart_IP))=cStart_IP then
           CheckIp = false
           exit function
          end if
             end if
      if Instr(cTemp_IP,"-") = 0 then
   cStart_IP = cTemp_IP
   cEnd_Ip   = cTemp_IP
      else
   cStart_IP = left(cTemp_IP,instr(cTemp_IP,"-")-1)
   cEnd_Ip   = left(cStart_IP,InStrRev(cStart_IP,".")-1)+"."+mid(cTemp_IP,instr(cTemp_IP,"-")+1)
      end if
      if  Ip2Str(cInput_Ip)>=Ip2Str(cStart_IP) and Ip2Str(cInput_Ip)<=Ip2Str(cEnd_Ip) then
          CheckIp = false
          exit function
      end if
     elseif Instr(cSingle_Ip(i),"ALLOW") <> 0 then    '允许
          
                 cTemp_IP = left(cSingle_Ip(i),instr(cSingle_Ip(i),":")-1)
         
      if Instr(cTemp_IP,"*") <> 0 then          '是宽范围
          cStart_IP = left(cTemp_IP,instr(cTemp_IP,"*")-1)
          if left(cInput_Ip,len(cStart_IP))=cStart_IP then
           CheckIp = true
          end if
             end if
      if Instr(cTemp_IP,"-") = 0 then
   cStart_IP = cTemp_IP
   cEnd_Ip   = cTemp_IP
      else
   cStart_IP = left(cTemp_IP,instr(cTemp_IP,"-")-1)
   cEnd_Ip   = left(cStart_IP,InStrRev(cStart_IP,".")-1)+"."+mid(cTemp_IP,instr(cTemp_IP,"-")+1)
      end if
      if  Ip2Str(cInput_Ip)>=Ip2Str(cStart_IP) and Ip2Str(cInput_Ip)<=Ip2Str(cEnd_Ip) then
          CheckIp =true
      else
          CheckIp =false
      end if
     end if
       next
end function
-----------------------------------------------
取当前网页的地址全名,以便返回用
<%
Function GetUrl()
  On Error Resume Next
  Dim strTemp
 If LCase(Request.ServerVariables("HTTPS")) = "off" Then
  strTemp = "http://"
 Else
  strTemp = "https://"
  End If
  strTemp = strTemp & Request.ServerVariables("SERVER_NAME")
  If Request.ServerVariables("SERVER_PORT") <> 80 Then strTemp = strTemp & ":" & Request.ServerVariables("SERVER_PORT")
  strTemp = strTemp & Request.ServerVariables("URL")
  If Trim(Request.QueryString) <> "" Then strTemp = strTemp & "?" & Trim(Request.QueryString)
  GetUrl = strTemp
End Function
'Response.write GetUrl()
url1=GetUrl()
url1=Server.URLEncode(url1)
%>

-----------------------------------------------
上传文件时,显示进度条程序
在需要引用进度条的也面上用
<script language="javascript" src="../ShowProcessBar.js"></script>
然后,
<input type="submit" value="开始上传" name="B1" IsShowProcessBar="True">
传参数 true
ShowProcessBar.js
—————————————————————————————————————————
AddProcessbar();
var bwidth=0;
var swidth = document.all.waiting.clientWidth;
function CheckIsProcessBar(obj)
{
if (obj.IsShowProcessBar=="True")
{
return false;
}
else
{
return true;
}
}
function CheckClick(e)
{
if (e == 1)
{
if (bwidth<swidth*0.98){
bwidth += (swidth - bwidth) * 0.025;
if (document.all)document.sbar.width = bwidth;
else document.rating.clip.width = bwidth;
setTimeout('CheckClick(1);',1000);
}
}
else
{
if(document.all)
{
if(document.all.waiting.style.visibility == 'visible')
{document.all.waiting.style.visibility = 'hidden';
bwidth = 1;}
whichIt = event.srcElement;
while (CheckIsProcessBar(whichIt))
{
whichIt = whichIt.parentElement;
if (whichIt == null)return true;
}

document.all.waiting.style.pixelTop = (document.body.offsetHeight - document.all.waiting.clientHeight) / 2 + document.body.scrollTop;
document.all.waiting.style.pixelLeft = (document.body.offsetWidth - document.all.waiting.clientWidth) / 2 + document.body.scrollLeft;
document.all.waiting.style.visibility = 'visible';
if(!bwidth)CheckClick(1);
bwidth = 1;
}
else
{
if(document.waiting.visibility == 'show')
{document.waiting.visibility = 'hide';
document.rating.visibility = 'hide';
bwidth = 1;}
if(e.target.href.toString() != '')
{
document.waiting.top = (window.innerHeight - document.waiting.clip.height) / 2 + self.pageYOffset;
document.waiting.left = (window.innerWidth - document.waiting.clip.width) / 2 + self.pageXOffset;
document.waiting.visibility = 'show';
document.rating.top = (window.innerHeight - document.waiting.clip.height) / 2 + self.pageYOffset+document.waiting.clip.height-10;
document.rating.left = (window.innerWidth - document.waiting.clip.width) / 2 + self.pageXOffset;
document.rating.visibility = 'show';
if(!bwidth)CheckClick(1);
bwidth = 1;
}
}
return true;
}
}
function AddProcessbar()
{
var Str=""
Str+= "<div id=waiting style=position:absolute;top:50px;left:100px;z-index:1;visibility:hidden >";
Str+= "<layer name=waiting visibility=visible zIndex=2 >"
Str+= "<table border=2 cellspacing=1 cellpadding=0 bordercolorlight=#FFFFFF bordercolordark=#C0C0C0 bgcolor=#E0E0E0>"
Str+= " <tr>"
Str+= " <td bgcolor=#E0E0E0 height=30px width=300px align=center>"
Str+= " <font color=black>数据正在处理中...</font>"
Str+= " </td>"
Str+= " </tr>"
Str+= " <tr>"
Str+= " <td bgcolor=#E0E0E0>"
Str+= " <img width=1 height=10 name=sbar style=background-color:#6699cc>"
Str+= " </td>"
Str+= " </tr>"
Str+= "</table> "
Str+= "</layer>"
Str+= "</div>"
document.write(Str)
if(document.all)document.onclick = CheckClick; 
}

-----------------------------------------------
既然是常见问题,我也来几个。
控制滚动:
=============
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>
<body style="margin:0px">
<table width="110" border="0" align="center" cellpadding="2" cellspacing="0" height="300px">
  <tr>
    <td id="i">
<marquee id="mar" direction="up" behavior="slide" height="100px" style="background-Color:#00ff00">
 <div style="background-Color:#ff0000" id="div">
      <p><a href="#">分类一</a></p>
      <p>分类二</p>
      <p>分类三</p>
      <p>分类四</p>
      <p>分类五</p>
      <p>分类六</p>
    </div>
</marquee>
<div id="div"></div>
 </td>
  </tr>
  <tr>
    <td>
      <input type="button" name="btnUp" value="向上" onMouseOver="UpScroll();" onMouseOut="StopScroll();">
      <input name="btnDown" type="button" value="向下" onMouseOver="DownScroll();" onMouseOut="StopScroll();">
    </td>
  </tr>
</table>
<script language="JavaScript">
var timer;
var mar = document.all.mar;
var div = document.all.div;
var h1 = div.offsetHeight;
var h2 = mar.height;
//向上移动
function UpMarquee(){
 if(mar.scrollTop>=h1)
  StopScroll();
 else 
  mar.scrollTop+=1;
}
function DownMarquee(){
 if(mar.scrollTop<=h2)
  StopScroll();
 else
  mar.scrollTop-=1;
 //alert(mar.scrollTop);
}
//循环调用向下移动函数
function UpScroll(){
 //alert(mar.scrollTop);
 //StopScroll();
 timer = setInterval('UpMarquee()',50);//循环调用
}
//循环调用向上移动函数
function DownScroll(){
 //StopScroll();
 timer = setInterval('DownMarquee()',50);//循环调用
}
//清除循环调用
function StopScroll(){
 clearInterval(timer);
}
</script>
</body>
</html>
=======================================================
检查时间:
================
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title></title>
<script language="JavaScript">
function isValid(vlu)
{
 var tmp1 = "";
 var i = 0;
 var bool = true;
 vlu += ":";
 i = vlu.indexOf(":");
 tmp = vlu.substr(0,i);
 vlu = vlu.substr(i+1,vlu.length);
 bool = isErr(tmp) & isErr1(tmp) & isErr2(tmp);
 i = vlu.indexOf(":");
 tmp = vlu.substr(0,i);
 vlu = vlu.substr(i+1,vlu.length);
 bool &= isErr(tmp) & isErr1(tmp) & isErr3(tmp);
 i = vlu.indexOf(":");
 tmp = vlu.substr(0,i);
 vlu = vlu.substr(i+1,vlu.length);
 bool &= isErr(tmp) & isErr1(tmp) & isErr3(tmp);
 if(bool == true)
  alert("ok.");
 else
  alert("The time is incorrect.");
}
function isErr(vlu)
{
 var bool = vlu.indexOf("-") >= 0 ? false : true;
 bool &= vlu.indexOf(".") >= 0 ? false : true;
 return bool;
}
function isErr1(vlu)
{
 return isNaN(parseInt(vlu)) ? false : true;
}
function isErr2(vlu)
{
 return parseInt(vlu) > 23 ? false : true;
}
function isErr3(vlu)
{
 return parseInt(vlu) > 59 ? false : true;
}
//isValid("25:59:00");
</script>
</head>
<body>
<input name="txtTime" type="text" id="txtTime" value="09:05:59">
<input type="button" name="Submit" value="°&acute;&Aring;&yen;" onClick="isValid(document.all.txtTime.value);">
</body>
</html>

-----------------------------------------------
调用Css做颜色变换:
======================
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>&Icirc;&THORN;±ê&Igrave;&acirc;&Icirc;&Auml;&micro;&micro;</title>
<style type="text/css">
<!--
.red {
 background-color: #FF0000;
}
.blue {
 background-color: #0000FF;
}
.yellow {
 background-color: #FFFF00;
}
.green {
 background-color: #00FF00;
}
.black {
 background-color: #000000;
}
.white {
 background-color: #FFFFFF;
}
.cyan {
 background-color: #00FFFF;
}
.purple {
 background-color: #FF00FF;
}
-->
</style>
<script language="javascript">
var timer;
var arrColor = new Array("red","green","yellow","blue","black","white","cyan","purple");
var index1 = 0;
var index2 = 7;
function ChangeColor1()
{
 for(var i=0; i<8; i++)
 {
  if(index1 == 8) index1 = 0;
  document.all('t'+(i+1)).className = arrColor[index1];
  document.all('b'+(i+1)).innerText = document.all('t'+(i+1)).className;
  document.all('b'+(i+1)).style.color = arrColor[index1++];
 }
 if(index1 == 8) index1 = 0;
 index1++;
}
function ChangeColor2()
{
 for(var i=8; i>0; i--)
 {
  if(index2 == 0) index2 = 8;
  document.all('c'+i).className = arrColor[--index2];
  document.all('f'+i).innerText = document.all('c'+i).className;
  document.all('f'+i).style.color = arrColor[index2];
 }
 if(index2 == 0) index2 = 8;
 --index2;
}
</script>
</head>
<body onLoad="setInterval('ChangeColor1()',500);setInterval('ChangeColor2()',500);">
<table width="720" border="1" align="center" cellpadding="0" cellspacing="0">
  <colgroup>
   <col width="12.5%">
 <col width="12.5%">
 <col width="12.5%">
 <col width="12.5%">
 <col width="12.5%">
 <col width="12.5%">
 <col width="12.5%">
 <col width="12.5%">
  </colgroup>
  <tr>
    <td id="t1" class="red" height="30">&nbsp;</td>
    <td id="t2" class="green">&nbsp;</td>
    <td id="t3" class="yellow">&nbsp;</td>
    <td id="t4" class="blue">&nbsp;</td>
    <td id="t5" class="black">&nbsp;</td>
    <td id="t6" class="white">&nbsp;</td>
    <td id="t7" class="cyan">&nbsp;</td>
    <td id="t8" class="purple">&nbsp;</td>
  </tr>
  <tr style="font-size:10px" align="center">
    <td id="b1" height="30">&nbsp;</td>
    <td id="b2">&nbsp;</td>
    <td id="b3">&nbsp;</td>
    <td id="b4">&nbsp;</td>
    <td id="b5">&nbsp;</td>
    <td id="b6">&nbsp;</td>
    <td id="b7">&nbsp;</td>
    <td id="b8">&nbsp;</td>
  </tr>
  <tr>
   <td colspan="8" height="100">&nbsp;</td>
  </tr>
  <tr>
    <td id="c1" class="red" height="30">&nbsp;</td>
    <td id="c2" class="green">&nbsp;</td>
    <td id="c3" class="yellow">&nbsp;</td>
    <td id="c4" class="blue">&nbsp;</td>
    <td id="c5" class="black">&nbsp;</td>
    <td id="c6" class="white">&nbsp;</td>
    <td id="c7" class="cyan">&nbsp;</td>
    <td id="c8" class="purple">&nbsp;</td>
  </tr>
  <tr style="font-size:10px" align="center">
    <td id="f1" height="30">&nbsp;</td>
    <td id="f2">&nbsp;</td>
    <td id="f3">&nbsp;</td>
    <td id="f4">&nbsp;</td>
    <td id="f5">&nbsp;</td>
    <td id="f6">&nbsp;</td>
    <td id="f7">&nbsp;</td>
    <td id="f8">&nbsp;</td>
  </tr>
</table>
</body>
</html>

 
Top
 
 回复人: luluso(luluso) ( ) 信誉:99  2003-11-07 18:22:49Z  得分:3 
 
 
?
见识了,呵呵强。
ASP中怎么运行一个服务器端程序呢
Set WShShell = Server.CreateObject("WScript.Shell")
RetCode = WShShell.Run("d:/xxx.exe", 1, True)
 
Top
 
 回复人: yangzixp(扬子.net) ( ) 信誉:100  2003-11-08 09:30:10Z  得分:3 
 
 
?
'-----------------------------------------------------------
'功能: 过虑HTML字符
'输入:字符串
'输出:经格式化后的字符串
function HTMLEncode(fString)
if not isnull(fString) then
    fString = replace(fString, ">", "&gt;")
    fString = replace(fString, "<", "&lt;")
    fString = Replace(fString, CHR(32)&CHR(32), "&nbsp;&nbsp;")
    fString = Replace(fString, CHR(9), "&nbsp;")
    fString = Replace(fString, CHR(34), "&quot;")
    fString = Replace(fString, CHR(39), "&#39;")
    fString = Replace(fString, CHR(13), "")
    fString = Replace(fString, CHR(10) & CHR(10), "</P><P> ")
    fString = Replace(fString, CHR(10), "<BR> ")
    HTMLEncode = fString
end if
end function
 
Top
 
 回复人: yangzixp(扬子.net) ( ) 信誉:100  2003-11-08 09:31:31Z  得分:3 
 
 
?
'参数:系统(如:product,article),条件(如果是数值,则默认为categoryID的值),排序,
'每页显示记录数,模式(more:显示更多字样,page:显示翻页导航),
'翻页导航模式(number:显示数字,page:显示上一页,下一页),记录显示模版名(显示记录的过程名)
class List
 dim p_system '系统表,如tblProduct,tblArticle
 dim p_where '条件
  dim p_orderBy '排序
 dim p_recordCount '每页显示记录数
   dim p_horizontal '每行显示记录数
   dim p_mode '列表模式,参数:more(更多模式,显示更多字样),page(列表模式,显示翻页导航)
   dim p_moreURL '更多模式时的URL 
 dim p_paginationMode '翻页导航模式,参数:number(数字导航,显示如:1,2,3,4),page(翻页导航,显示如:上一页,下一页)
   dim p_models '列表模版过程
   dim p_table '列表的table标签
   dim p_page '页码
    dim p_member '是否显示会员产品
 dim p_groupWhere
 
  Private Sub Class_Initialize
     p_system=""
  p_where=""
  p_orderBy=" order by categoryID,orderBy,postdate"
  p_recordCount=15
  p_horizontal=4
  p_mode=""
  p_moreURL=""
  p_paginationMode="page"
  p_models=""
  p_table="<table width=100% border=0 align=center cellpadding=0 cellspacing=0 bordercolor=#CCCCCC  style='border-collapse: collapse'>"
  p_page=1
  p_member=false
  p_groupWhere="groupID=0"
 End Sub
 
   Property Let system(value)
  p_system=value
 end property
   Property Let where(value)
  if isInt(value) then
   p_where=" where categoryID="&value
  else
   p_where=" where ("&value&")"
  end if
 end property
   Property Let orderBy(value)
  p_orderBy=" order by "&value
 end property
   Property Let recordCount(value)
  p_recordCount=value
 end property
   Property Let horizontal(value)
  p_horizontal=value
 end property
   Property Let mode(value)
  p_mode=value
 end property
   Property Let moreURL(value)
  p_moreURL=value
 end property
   Property Let paginationMode(value)
  p_paginationMode=value
 end property
   Property Let models(value)
  p_models=value
 end property
   Property Let table(value)
  p_table=value
 end property
   Property Let page(value)
  if getNumeric(value)<1 then
   p_page=1
  else
   p_page=int(value)
  end if
 end property
   Property Let member(value)
 
  p_member=value
  
  if p_member then
   authorizationID=getValue("tblMember","authorizationID","memberID="&session("memberID"))
   if authorizationID="" or authorizationID=0 then
    authorizationID=getValue("tblGroup","authorizationID","groupID="&session("groupID"))
   end if
   virtual=getValue("tblAuthorization","virtual","authorizationID="&authorizationID)
   authArr=split(virtual,",")
   for i=0 to ubound(authArr)
    if i=0 then
     p_groupWhere="groupID="&getValue("tblGroup","groupID","authorizationID="&authArr(i))
    else
     p_groupWhere=p_groupWhere&" or groupID="&getValue("tblGroup","groupID","authorizationID="&authArr(i))
    end if
   next
  else
   p_groupWhere="groupID=0"
  end if
 end property
 
 '列表过程
 public sub List()
  dim rs
  dim where
  
  if p_where="" then
   where=" where "&p_groupWhere&" and publish=1"
  else
   where=p_where&" and ("&p_groupWhere&") and publish=1"
  end if
  strSql="select * from "&p_system&where&p_orderBy
  'response.write strSql
  'response.end
  set rs=getRecord(strSql)
 
  if rs.eof then
   response.write convertEncode(lgeNoRecord,gb,language)
   exit sub
  end if
 
  rs.pageSize=p_recordCount
  
  if rs.pagecount<p_page then p_page=rs.pagecount
  
  rs.AbsolutePage=p_page
 
  dim ii
  response.write p_table
  for i=1 to p_recordCount
   if rs.eof then
    exit for
   end if
   response.write "<tr>"
   for ih=0 to p_horizontal
    if ii=p_recordCount then
     exit for
    end if
    if rs.eof then
     response.write "<td width=" & 1/(p_horizontal+1)*100 & "% >&nbsp;</td>"
    else
     response.write "<td width=" & 1/(p_horizontal+1)*100 & "% >"
     execute "call " & p_models
     response.write "</td>"
     rs.movenext
    end if
    ii=ii+1
   next
   response.write "</tr>"
  next
  response.write "</table>"
  if p_mode="more" then
   response.write "<div align=right>"&p_moreURL&"</div>"
  end if
  if p_mode="page" then
   response.write "<table width=100% border=0 cellspacing=0 cellpadding=3><tr><td align=right>"
   call pagination(p_page,rs.recordCount,rs.pageCount,p_paginationMode)
   response.write "</td></tr></table>"
  end if
 end sub
end class
'-------------------------------列表过程结束-------------------------------------------------------------
 
Top
 
 回复人: zhanghao5188(linux) ( ) 信誉:100  2003-11-08 10:00:24Z  得分:0 
 
 
?
精華,建義寫一本書!呵呵!
 
Top
 
 回复人: xiaoxo(iei) ( ) 信誉:95  2003-11-08 10:47:00Z  得分:2 
 
 
?
当我第一次浏览该网页news.asp时可以。但我刷新一下出现下面的错误
-------------------------------------------
Microsoft OLE DB Provider for ODBC Drivers 错误 '80040e21'
ODBC 驱动程序不支持所需的属性。 
/sql/news.asp,行5 
-----------------------------------------------------
我的conn.asp 是这样的。
<%
set conn =server.CreateObject ("adodb.connection")
conn.Open "driver={SQL Server};server=(local);uid=news;password=2222;database=news"
%>
该news.asp
<!--#include file="conn.asp" -->
<%
set rs=server.createobject("adodb.recordset")
sql="select * from newsType where flag=1"
rs.open sql,conn,1,1
%>
<body>
<%=rs("typeid")%>
<% rs.close
set rs=nothing
%></body>
然后我在conn.asp的文件里加了这句话<%on error resume next%>‘就可以了。
<!--#include file="conn.asp" -->
<%on error resume next%>‘就是这句话'
<%
set rs=server.createobject("adodb.recordset")
sql="select * from newsType where flag=1"
rs.open sql,conn,1,1
%>
<body>
<%=rs("typeid")%>
<% rs.close
set rs=nothing%>
该news.asp
<!--#include file="conn.asp" -->
<%on error resume next%>‘这句话"
<%
set rs=server.createobject("adodb.recordset")
sql="select * from newsType where flag=1"
rs.open sql,conn,1,1
%>
<body>
<%=rs("typeid")%>
<% rs.close
set rs=nothing
%></body>
什么呢???这不知是不是个问题
 
Top
 
 回复人: pepos(神舟五号) ( ) 信誉:99  2003-11-08 10:56:21Z  得分:0 
 
 
?
好东东。。。再接再历
 
Top
 
 回复人: fason(阿信) ( ) 信誉:688  2003-11-08 11:31:33Z  得分:3 
 
 
?
UBB转换:
http://expert.csdn.net/Expert/topic/1360/1360322.xml?temp=.9789087
屏蔽后退键:
http://expert.csdn.net/Expert/topic/1556/1556985.xml?temp=.4249231
生成XML文件:
http://search.csdn.net/expert/topic/3/306/2002/4/15/649096.htm

如果有时间,整理成CHM供下载更好,:_)
 
Top
 
 回复人: windancer(^_^) ( ) 信誉:110  2003-11-08 13:53:38Z  得分:3 
 
 
?
ftp://qxlq.vicp.net:21001/
我常用的编程参考CHM书,哪位找个公共空间放放,我自己的机器不稳定
 
Top
 
 回复人: windancer(^_^) ( ) 信誉:110  2003-11-08 14:14:42Z  得分:3 
 
 
?
二十八条改善 ASP 性能和外观的技巧 
http://www.microsoft.com/china/technet/iis/tips/ASPTIPS.asp
 
Top
 
 回复人: windancer(^_^) ( ) 信誉:110  2003-11-08 14:22:26Z  得分:3 
 
 
?
如何在客户端无刷新调用服务端代码
1.<iframe src="ifm.asp?param=??"></iframe>
2.xmlhttp:
dim  objXMLHTTP
set  objXMLHTTP=CreateObject("MICROSOFT.XMLHTTP")  
objXMLHTTP.open  "GET","xmlhttp.asp",false
 '参数1:post,get;参数2:请求的URL, 参数3:同步或异步调用
objXMLHTTP.send  ""
magbox objXMLHTTP.ResponseText  '服务端输出到客户端的文本数据
------------
xmlhttp:参考
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/xmlsdk30/htm/xmobjxmlhttprequest.asp
 
Top
 
 回复人: yaozhg(不可能,不可能) ( ) 信誉:99  2003-11-08 14:23:43Z  得分:3 
 
 
?
谁能把这些全整理成chm呢????
<%
'取得地址栏完整地址
Function GetUrl()
  On Error Resume Next
  Dim strTemp
 If LCase(Request.ServerVariables("HTTPS")) = "off" Then
  strTemp = "http://"
 Else
  strTemp = "https://"
  End If
  strTemp = strTemp & Request.ServerVariables("SERVER_NAME")
  If Request.ServerVariables("SERVER_PORT") <> 80 Then strTemp = strTemp & ":" & Request.ServerVariables("SERVER_PORT")
  strTemp = strTemp & Request.ServerVariables("URL")
 
  strtemp=left(strtemp,instrRev(strtemp,"/"))
 
  GetUrl = strTemp
End Function
Response.write GetUrl()
%>
 
Top
 
 回复人: windancer(^_^) ( ) 信誉:110  2003-11-08 14:36:11Z  得分:3 
 
 
?
<%
'===========================================================
'分页类,大体思想由.Net的DataGrid的使用方式而来
'功能:自动生成datagrid列表头和内容,以及分页栏
'根据网友bubuy (澎湃 NoMoneyToBuy)得分页函数修改成类
'使用示例:
'dim DG
'dim Url
'dim Fld(2)
'dim FldName(2)
'dim FldWidth(2)
'Fld(0) = "ID"
'Fld(1) = "Title"
'Fld(2) = "Input_Date"
'FldName(0) = "编号"
'FldName(1) = "标题"
'FldName(2) = "录入日期"
'FldWidth(0) = "10%"
'FldWidth(1) = "60%"
'FldWidth(2) = "30%"
'set DG = new DataGrid
'DG.DataSource = rs_Grid
'DG.titleColor = "#DCE19D"
'DG.PageSize = 1
'DG.Fields = Fld
'DG.FieldsName = FldName
'DG.fieldWidth = FldWidth
'Url = request.ServerVariables("URL") & "?Param=testParameter" '存在原有参数的情况
'DG.Url = Url
'DG.Generate()
'=============Designed By windancer 2003.10.17===============
Class DataGrid
  Private obj_RecordSet   ' recordset
  Private int_PageSize  ' 每页纪录数
  '两个数组保存数据库字段名和中文名称
  Private Arr_Field   ' 数据库字段
  Private Arr_FieldName  ' 字段显示名称()
  Private Arr_FieldWidth ' 字段显示宽度
  Private str_TitleColor ' 表头颜色#efffce
  Private str_Url   '请求的URL
  Private str_Error        ' 出错信息
  Private Sub Class_Initialize()
   int_PageSize = 10
   str_TitleColor = "#ffffff"
   str_Error = ""
  End Sub
'===============================================================
'属性信息
'================================================================
'-----------------------------------
'数据源,暂时只支持RecordSet
'-----------------------------------
  Public Property Let dataSource(obj)
    set obj_RecordSet = obj
  End Property
 
  Public Property Let pageSize(intValue)
    int_PageSize = intValue
  End Property
  Public Property Get pageSize
    PageSize= int_Categoryid
  End Property
 
  Public Property Let Fields(Arr)
    Arr_Field = Arr
  End Property
  Public Property Get Fields
    Fields= Arr_Field
  End Property
 
  Public Property Let fieldsName(Arr)
    Arr_FieldName = Arr
  End Property
  Public Property Get fieldsName
    fieldsName= Arr_FieldName
  End Property
 
  Public Property Let fieldWidth(Arr)
    Arr_FieldWidth = Arr
  End Property
  Public Property Get fieldWidth
    fieldWidth= Arr_FieldWidth
  End Property
 
  Public Property Let titleColor(strValue)
    str_TitleColor = strValue
  End Property
  Public Property Get titleColor
    titleColor= str_TitleColor
  End Property
  '-----------------------------------------------------
  '这个属性是为了保存Url路径
  '如果当前路径带有参数,那么就用&Page=x,否则就用?Page=x
  '------------------------------------------------------
  Public Property Let Url(StrValue)
    str_Url = StrValue
  End Property
  Public Property Get Url
    Url= str_Url
  End Property
'================================================================
'方法
'================================================================
'----------------------------------------------------------------
'显示当前错误
'----------------------------------------------------------------
Private Sub ShowLastError()
 response.Write(str_Error)
 response.End()
End Sub
'----------------------------------------------------------------
'Generate()
'利用ado分页
'-----------------------------------------------------------------
Public Sub Generate()
'----检查参数--------------------------
 Check
'---------变量声明-----------------------------------
 Dim FieldCount     '显示字段
 FieldCount = Ubound(Arr_Field) + 1
  Dim CurrentPage     '当前页
 Dim PgCount      '总页数
 Dim RecCount     '记录数,本来用rs.recordCount可以取到,保存下来效率会比较高
 Dim HasOtherParam    'URL是否包含其他参数
 Dim PageParam     '当前分页Url参数
 Dim PageInfomation    '当前分页状态信息
 Dim Seperator     '设置分隔符
 Seperator = "&nbsp;&nbsp;" 
'-------------处理Url参数---------------------------
 if instr(str_Url,"?")>0 then
  HasOtherParam = true
  PageParam = "&Page="
 else
  HasOtherParam = false
  PageParam = "?Page="
 end if
'----------获取当前页--------------------------------
 CurrentPage = request.QueryString("Page")
 if CurrentPage="" then
  CurrentPage=1
 else
  CurrentPage=Cint(CurrentPage)
 end if
'-----------处理数据源------------------------------
 obj_RecordSet.PageSize = int_PageSize
 RecCount = obj_RecordSet.RecordCount
 PgCount = obj_RecordSet.PageCount 
 IF obj_RecordSet.Eof Then
  Response.Write("<center><font stlye='font-size:14px;' color='#ff0000'>对不起,没有记录!</font></center>")
 Else
'-----------处理ADO分页----------------------------
  IF CurrentPage < 1 Then
   CurrentPage = 1
  Else
   If CurrentPage>PgCount Then
    CurrentPage = PgCount
   End If
  End IF
  obj_RecordSet.absolutepage = CurrentPage
 
  Response.Write("<table width=100% border='0' cellpadding='0' cellspacing='0' style='font-size:12px;'>")
'---------------翻页链接-----------------------------
  Dim FirstLink,PrevLink,NextLink,LastLink '定义向上和向下翻的变量
'-----------------------首页-------------------------
  if CurrentPage>1 then
   FirstLink = "<a href='" & URL & PageParam & "1'>首页</a>"
   PrevLink = "<a href='" & URL & PageParam & Cstr(CurrentPage-1) & "'>上一页</a>"
  else
   FirstLink = "首页"
   PrevLink = "上一页"
  end if
  '------------下一页----------------
  if CurrentPage<PgCount then
   NextLink = "<a href='" & URL & PageParam & Cstr(CurrentPage+1) & "'>下一页</a>"
   LastLink = "<a href='" & URL & PageParam & PgCount & "'>尾页</a>"
  else
   NextLink = "下一页"
   LastLink = "尾页"
  end if
  PageInfomation = FirstLink & Seperator & PrevLink & Seperator & NextLink & Seperator & LastLink & Seperator & "每页" & Cstr(int_PageSize) & "条记录" & Seperator &  "共" & PgCount & "页" & Seperator & "目前第" & CurrentPage & "页" & Seperator
  Response.Write("<tr><td align=center>")
  Response.Write("<table width='100%' border='1' cellpadding='2' cellspacing='2' bordercolor='#999999'>")
  '---------------设置表头-----------------
  Response.Write("<tr bgcolor='" & str_TitleColor & "'>")
  Dim i
  For i=0 to FieldCount -1
   Response.Write("<td align='center' width='" & Arr_FieldWidth(i) & "'><font style='font-size:14px;'><b>" & Arr_FieldName(i) & "</b></font></td>")
  Next
  Response.Write("</tr>")
  '---------------------输出内容---------------------------------
  i=0
  While (not obj_RecordSet.EOF) and i<int_PageSize
   Dim Cursor
   Response.Write("<tr>")
   For Cursor = 0 to FieldCount -1
      Response.Write("<td align='center'>" & obj_RecordSet(Arr_Field(Cursor)) & "</td>")
   Next
   Response.Write("</tr>")
   i=i+1
   obj_RecordSet.MoveNext
  Wend
  '------------------------输出分页条------------------------------------
  Response.Write("<tr><td align='right' colspan='" & Cstr(FieldCount) & "'>" & PageInfomation & "</td></tr>")
  response.Write("</table></td></tr></table>")
   End IF
 End Sub
'----------检查参数是否正确---------------
 Private Sub Check()
  if Ubound(Arr_Field)<>Ubound(Arr_FieldName) then
   str_Error="Fields数组和FieldName数组维数必须相同"
  end if
  if obj_RecordSet=empty then
   str_Error="数据源不能为空,请设置dataSource属性"
  end if
  if int_PageSize="" then
   str_Error="数据源不能为空"
  end if
  ShowLastError
 End Sub
End Class

%>
 
Top
 
 回复人: LibraLjh(突然空闲) ( ) 信誉:100  2003-11-08 14:49:29Z  得分:0 
 
 
?
好东西,
顶一下!!
 
Top
 
 回复人: hillhero789(丘) ( ) 信誉:104  2003-11-08 15:10:50Z  得分:3 
 
 
?
防止用户直接访问页面(防止自制表单提交,直接通过链接访问)
function checkPrePage()
 url=request.ServerVariables("HTTP_REFERER")
 url=trim(replace(url,"http://",""))
 url=trim(left(url,len(request.ServerVariables("SERVER_NAME"))))
 if url<>trim(request.ServerVariables("server_name")) then
  response.Write("请通过正当的方法访问本网站")
  response.End()
 end if
end function
 
Top
 
 回复人: hillhero789(丘) ( ) 信誉:104  2003-11-08 15:21:00Z  得分:3 
 
 
?
通过一下的两个函数可以实现图片,文字的同时提交处理。
Function BinaryToString(str)
strto = ""
for i=1 to lenb(str)
if AscB(MidB(str, i, 1)) > 127 then
strto = strto & chr(Ascb(MidB(str, i, 1))*256+Ascb(MidB(str, i+1, 1)))
i = i + 1
else
strto = strto & Chr(AscB(MidB(str, i, 1)))
end if
next
BinaryToString=strto
End Function
function gainformdata(n)
dim formsize,formdata,divider,datastart,dataend
redim mydata(n-1)
formsize = Request.TotalBytes
formdata = Request.BinaryRead(formsize)
for i=1 to n
 bncrlf = chrB(13) & chrB(10)
 divider = leftB(formdata,clng(instrB(formdata,bncrlf))-1)
 datastart = instrB(formdata,bncrlf & bncrlf)+4
 dataend = instrB(datastart+1,formdata,divider) - datastart-2
 mydata(i-1) = midB(formdata,datastart,dataend)
 formdata=rightB(formdata,clng(formsize-instrB(datastart+1,formdata,divider))+1)
 formsize=lenB(formdata)
next
gainformdata=mydata
end function
Demo:
a.htm:
<form name="form1" method="post" action="b.asp"  enctype="multipart/form-data">
  <textarea name="txt"></textarea>
  <input type="file" name="file">
  <input type="submit" name="Submit" value="提交">
</form>
b.asp:
'链接数据库
data=gainfromdata(2)
rs("txt")=binarytostring(data(0))
rs("img").appendchunk=data(1)
 
Top
 
 回复人: zjcxc(邹建) ( ) 信誉:100  2003-11-08 17:33:01Z  得分:0 
 
 
?
学习.
收藏
 
Top
 
 回复人: zjcxc(邹建) ( ) 信誉:100  2003-11-08 17:37:51Z  得分:3 
 
 
?
--更正,前面发的,字段少了一个type,特此补上:
'==================================================================--
'
'  用ASP实现无组件上传/下载文件
'
' 功能简介 
' 将上传的文件数据保存到数据库中,可以处理表单中的多个上传文件的情况
' 适用于各种数据库,使用ADO的方法连接数据库
' 本示例中使用的是ACCESS数据库:zj.mdb
' 表:tb_img(id int(自增列),path text(255) 保存上传文件的目录
' ,fname text(250) 保存上传的文件名,type test(250) 保存上传文件的类型
'        ,img ole对象 保存上传的文件内容
'
' 邹建  2003.10
'==================================================================

'==================================================================
'
' 上传文件的HTML页: zj_up.htm
'
'==================================================================
<html>
<head>
<title>文件上传保存到数据库中</title>
</head>
<body>
<form name="form1" enctype="multipart/form-data" method="post" action="zj_up.asp">
  <p>
    <input type="file" name="file">
    <input type="submit" name="Submit" value="上传">
  </p>
</form>
</body>
</html>

'==================================================================
'
'  上传文件保存到数据库的ASP页: zj_up.asp
'
'==================================================================
<%
Response.Expires=0
Function f_Bin2Str(ByVal sBin)
    Dim iI, iLen, iChr, iRe      
    iRe = ""
    If Not IsNull(sBin) Then
        iLen = LenB(sBin)
        For iI = 1 To iLen
            iChr = MidB(sBin, iI, 1)
            If AscB(iChr) > 127 Then
                iRe = iRe & Chr(AscW(MidB(sBin, iI + 1, 1) & iChr))
                iI = iI + 1
            Else
                iRe = iRe & Chr(AscB(iChr))
            End If
        Next
    End If   
    f_Bin2Str = iRe
End Function
iConcStr = "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False" & _
 ";Data Source=" & server.mappath("zj.mdb")
iSql="tb_img"
set iRe=Server.CreateObject("ADODB.Recordset")
iRe.Open iSql,iConcStr,1,3
iLen=Request.TotalBytes
sBin=Request.BinaryRead(iLen)
iCrlf1 = ChrB(13) & ChrB(10)
iCrlf2 = iCrlf1 & iCrlf1
iLen = InStrB(1, sBin, iCrlf1) - 1
iSpc = LeftB(sBin, iLen)
sBin = MidB(sBin, iLen + 34)
iPos1 = InStrB(sBin, iCrlf2) - 1
While iPos1 > 0
 iStr = f_Bin2Str(LeftB(sBin, iPos1))
 iPos1 = iPos1 + 5
 iPos2 = InStrB(iPos1, sBin, iSpc)
 
 iPos3 = InStr(iStr, "; filename=""") + 12
 If iPos3 > 12 Then
  iStr = Mid(iStr, iPos3)
  iPos3 = InStr(iStr, Chr(13) & Chr(10) & "Content-Type: ") - 2
  iFn = Left(iStr, iPos3)
  If iFn <> "" Then
   iRe.AddNew
   ire("path")=left(iFn,instrrev(iFn,"/")) 
   iRe("fname") = mid(iFn,instrrev(iFn,"/")+1)
   iRe("type") = Mid(iStr, iPos3 + 18)
   iRe("img").AppendChunk MidB(sBin, iPos1, iPos2 - iPos1)
   iRe.Update
  End If
 End If
 
 sBin = MidB(sBin, iPos2 + iLen + 34)
 iPos1 = InStrB(sBin, iCrlf2) - 1
Wend
iRe.close
set iRe=Nothing
%>
'==================================================================
'
'  下载数据的ASP页: zj_down.asp
'
'==================================================================
<%
Response.Buffer=true
Response.Clear
iConcStr = "Provider=Microsoft.Jet.OLEDB.4.0;Persist Security Info=False" & _ 
 ";Data Source=" & server.mappath("zj.mdb")
set iRe=server.createobject("adodb.recordset")
iSql="tb_img"
iRe.open iSql,iconcstr,1,1
Response.ContentType=ire("type")
Response.BinaryWrite iRe("img")
iRe.close
set iRe=Nothing
%>
 
Top
 
 回复人: happymingnan(乱码) ( ) 信誉:108  2003-11-08 18:28:14Z  得分:3 
 
 
?
5.
   弹出提示信息 , 确定 与 取消 怎么做的
    οnclick="{if(confirm('确定删除选定的纪录吗?')){this.document.inbox.submit();return true;}return false;}"
6.  组合查询的优化,谢谢 
sql = "select * from book where bname like '%" & txtbname.Text & "%' and bauthor like '%" & txtauthor.Text & "%' and bpublish like '%" & txtpublish.Text & "%' and bdescription like '%" & txtdescription.Text & "%' order by bookid desc"
组合查询,有是四个组合条件,这样写是不是效率比较低,我该怎么优化一下呢?
谢谢。
分析,在SQL中,用LIKE是比较费时间的,所以最好是少用。
同时 ,四个TEXT框,输入条件是,一定会有没有输入的条件的时候,就会出现 LIKE "%"的情况,其实这种情况下就等于这个条件没有。
所以,把生成SQL语句的代码多写些,
Dim WhereStr as string
if txtbname.Text<>"" then
    WhereStr="bname like '%" & txtbname.Text & "%'"
ELSE IF ....
    .....
ENDIF
这样是一个概率的问题,如果四个全输入的话,是一样的,但如果只输入一个的问,速度会比你的快些!
 sql = "select * from book where "
If txtbname.Text <> "" Then
   sql = sql & "bname like '%" & txtbname.Text & "%'"
ElseIf txtauthor.Text <> "" Then
   sql = sql & "bauthor like '%" & txtauthor.Text & "%'"
ElseIf txtpublish.Text <> "" Then
   sql = sql & "bpublish like '%" & txtpublish.Text & "%'"
ElseIf txtdescription.Text <> "" Then
   sql = sql & "bdescription like '%" & txtdescription.Text & "%'  "
End If
8.如何禁止刷新
<SCRIPT LANGUAGE="JavaScript">
document.onkeydown = function() {
 if(event.keyCode==116) {
  event.keyCode=0;
  event.returnValue = false;
 }
}
document.oncontextmenu = function() {event.returnValue = false;}
</SCRIPT>
页面已经禁止刷新
12.
sql server 用:sql = "update reg set dealtime=getdate() where id= " & request.querystring("id")
因为 SQL SERVER里没有 now() 这个函数,而是用 getdate() 取代了
所以你的会报错.
ACCESS没有这个函数:)
只有date()和now()
 
Top
 
 回复人: awaysrain(绝对零度)(新的一年,新的开始) ( ) 信誉:155  2003-11-08 18:38:47Z  得分:0 
 
 
?
ASP操纵SerV-U开FTP
http://expert.csdn.net/Expert/topic/2322/2322539.xml?temp=1.874942E-02

连结其他数据库的方法(*.dbf,*.txt,excel,foxpro等)    ----收藏
2002-10-30 18:41:05   浏览次数:145 
 
'连结dbf文件
<%
'  建立Connection  对象
Set  conn  =  Server.CreateObject("ADODB.Connection")
Driver  =  "Driver={Microsoft  Visual  FoxPro  Driver};"
SourceType  =  "SourceType=DBF;"
DBPath  =  "SourceDB="  &  Server.MapPath(  "Dbf"  )
'  调用Open  方法连接数据库 
conn.Open  Driver  &  SourceType  &  DBPath
Set  rs  =  Server.CreateObject("ADODB.Recordset") 
'  打开数据源,参数二为Connection对象
rs.Open  "Select  *  From  sample",  conn,  2,  2
%>
'连结foxpro文件
<%
'  建立Connection  对象
Set  conn  =  Server.CreateObject("ADODB.Connection")
Driver  =  "Driver={Microsoft  Visual  FoxPro  Driver};"
SourceType  =  "SourceType=DBC;"
DBPath  =  "SourceDB="  &  Server.MapPath(  "Dbf/Sample.dbc"  )
'  调用Open  方法连接数据库 
conn.Open  Driver  &  SourceType  &  DBPath
Set  rs  =  Server.CreateObject("ADODB.Recordset") 
'  打开数据源,参数二为Connection对象
rs.Open  "Select  *  From  sample",  conn,  2,  2
%>
'连结excel文件 
<%
'  建立Connection对象
Set  conn  =  Server.CreateObject("ADODB.Connection")
Driver  =  "Driver={Microsoft  Excel  Driver  (*.xls)};"
DBPath  =  "DBQ="  &  Server.MapPath(  "Sample.xls"  )
'  调用Open  方法连接数据库 
conn.Open  Driver  &  DBPath
Set  rs  =  Server.CreateObject("ADODB.Recordset") 
'  打开数据源,参数二为Connection对象
rs.Open  "Select  *  From  [成绩单$]",  conn,  2,  2
%>
'连结txt文件 
<%
'  建立Connection  对象
Set  conn  =  Server.CreateObject("ADODB.Connection")
Driver  =  "Driver={Microsoft  Text  Driver  (*.txt;  *.csv)};"
DBPath  =  "DBQ="  &  Server.MapPath(  "Text"  )
'  调用Open  方法连接数据库 
conn.Open  Driver  &  DBPath
Set  rs  =  Server.CreateObject("ADODB.Recordset") 
'  打开数据源,参数二为Connection对象
rs.Open  "Select  *  From  sample.txt",  conn,  2,  2
%>

 
Top
 
 回复人: superdullwolf(超级大笨狼,每天要自强) ( ) 信誉:127  2003-11-08 19:28:08Z  得分:3 
 
 
?
画图:-)
<OBJECT id=StructuredGraphicsControl1 style="LEFT: 0px; WIDTH: 392px; TOP: 0px; HEIGHT: 240px"
  height=240 width=392 classid="clsid:369303C2-D7AC-11D0-89D5-00A0C90833E6"> 
</OBJECT>
<P>&nbsp;</P>
<SCRIPT LANGUAGE=vbscript>
StructuredGraphicsControl1.DrawingSurface.ArcDegrees 0,0,0,30,50,60
StructuredGraphicsControl1.DrawingSurface.ArcRadians 30,0,0,30,50,60
StructuredGraphicsControl1.DrawingSurface.Line 10,10,100,100
</SCRIPT>
 
Top
 
 回复人: superdullwolf(超级大笨狼,每天要自强) ( ) 信誉:127  2003-11-08 19:33:21Z  得分:3 
 
 
?
生成excel
<!-- #include file=../inc/connect.asp -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>下载excel文件</title>
</head>
<body>
<%
set rs=server.CreateObject("adodb.recordset")
dbopen
sql=request("sql")
sql=replace(sql,"|百分号|",ucase("%"))
title=request("title")
'response.write sql & "<br>"
rs.open sql,conn,3,2

set xlapp=server.createobject("excel.application")
xlapp.Visible = False
set mybook=xlapp.Workbooks.Add
set mysheet=mybook.worksheets(1)
myarray=split(title,"|")
'增加表头
for i=0 to ubound(myarray)-1
 rangex=ucaSE(chr(65+i))
 mysheet.range(rangex & 1 ).value=cstr(myarray(i))
next
set myarray=nothing
if rs.recordcount>0 then
 j=1
 do while not  rs.eof
  j=j+1'行
  for i=0 to rs.fields.count-1
   if i<26 then
   rangex=ucaSE(chr(65+i))
   'response.write rangex & j  & "<br>"
    if not isnull(rs.fields(i).value) then    mysheet.range(rangex & j ).value=cstr(rs.fields(i).value)
   end if  
  next
  rs.movenext
 loop
end if
'response.write rs.fields.count & "<br>"
'response.write rs.recordcount & "<br>"
randomize
 myfilename=Session("UserRealName") & date() & "-" & cint(rnd *10000) & ".xls"
 mypath=server.mappath("excel.asp")
 myarray=split(mypath,"/")
 mypath=""
for i=0 to ubound(myarray)-1
 mypath=mypath &  myarray(i) & "/"
next
'response.write mypath & myfilename
mybook.saveas(mypath & myfilename)
mybook.close
xlapp.quit
set mysheet=nothing
set mybook=nothing
set xlapp=nothing
%>
<img src="../i/D_Wealth_Out.gif" width="16" height="16"><a name="download" href="<%="download.asp?filename="  & myfilename%>">下载
<%=myfilename%></a>
</body>
</html>

 
Top
 
 回复人: superdullwolf(超级大笨狼,每天要自强) ( ) 信誉:127  2003-11-08 19:35:08Z  得分:3 
 
 
?
下载任何文件(尤其是IE关联打开的)
<%
Dim Stream
Dim Contents
Dim FileName
Dim FileExt
Const adTypeBinary = 1
FileName = Request.QueryString("FileName")
if FileName = "" Then
    Response.Write "无效文件名."
    Response.End
End if
' 下面是不希望下载的文件
FileExt = Mid(FileName, InStrRev(FileName, ".") + 1)
Select Case UCase(FileExt)
    Case "ASP", "ASA", "ASPX", "ASAX", "MDB"
        Response.Write "受保护文件,不能下载."
        Response.End
End Select
' 下载这个文件
Response.Clear
Response.ContentType = "application/octet-stream"
Response.AddHeader "content-disposition", "attachment; filename=" & FileName
Set Stream = server.CreateObject("ADODB.Stream")
Stream.Type = adTypeBinary
Stream.Open
Stream.LoadFromFile Server.MapPath(FileName)
While Not Stream.EOS
    Response.BinaryWrite Stream.Read(1024 * 64)
Wend
Stream.Close
Set Stream = Nothing
Response.Flush
Response.End
%>

 
Top
 
 回复人: blueice2002(蓝冰) ( ) 信誉:105  2003-11-08 19:42:44Z  得分:3 
 
 
?
asp常用函数
*************************************************
*blueice 2003整理 http://hshlin.8u8.com         *
*************************************************
asp常用函数 
Array()
CInt()
CreateObject()
CStr()
Date()
DateAdd()
DateDiff()
Day()
FormatCurrency()
FormatNumber()
FormatPercent()
Hour()
Instr()
InstrRev()
Int()
IsArray()
IsDate()
IsEmpty()
IsNull()
IsNumeric()
IsObject()
LBound()
LCase()
Left()
Len()
LTrim()
Mid()
Minute()
Month()   
MonthName()
Now()
Replace()
Right()
Rnd()
Round()
Rtrim()
Second()
StrReverse()
Time()
Trim()
UBound()
UCase()   
VarType()  
WeekDay()
WeekDayName()
Year()
_______________________________________________________________________________
_______________________________________________________________________________
_______________________________________________________________________________
Array()
 FUNCTION: 返回一个数组
 SYNTAX: Array(list)
 ARGUMENTS: 字符,数字均可
 EXAMPLE: <%
Dim myArray()
For i = 1 to 7
  Redim Preserve myArray(i)
  myArray(i) = WeekdayName(i)
Next
%>
 RESULT: 建立了一个包含7个元素的数组myArray
myArray("Sunday","Monday", ... ... "Saturday")
_______________________________________________________________________________
 
CInt()
 FUNCTION: 将一个表达式转化为数字类型
 SYNTAX: CInt(expression)
 ARGUMENTS: 任何有效的字符均可
 EXAMPLE: <%
f = "234"
response.write cINT(f) + 2
%>
 RESULT: 236
转化字符"234"为数字"234",如果字符串为空,则返回0值 
_______________________________________________________________________________
 
CreateObject()
 FUNCTION: 建立和返回一个已注册的ACTIVEX组件的实例。
 SYNTAX: CreateObject(objName)
 ARGUMENTS: objName 是任何一个有效、已注册的ACTIVEX组件的名字.
 EXAMPLE: <%
Set con = Server.CreateObject("ADODB.Connection")
%>
 RESULT: 
_______________________________________________________________________________
 
CStr()
 FUNCTION: 转化一个表达式为字符串.
 SYNTAX: CStr(expression)
 ARGUMENTS: expression 是任何有效的表达式。
 EXAMPLE: <%
s = 3 + 2
response.write "The result is: " & cStr(s)
%>
 RESULT: 转化数字“5”为字符“5”。
_______________________________________________________________________________
 
Date()
 FUNCTION: 返回当前系统日期.
 SYNTAX: Date()
 ARGUMENTS: None.
 EXAMPLE: <%=Date%>
 RESULT: 8/4/99
_______________________________________________________________________________
 
DateAdd()
 FUNCTION: 返回一个被改变了的日期。
 SYNTAX: DateAdd(timeinterval,number,date)
 ARGUMENTS: timeinterval is the time interval to add; number is amount of
time intervals to add; and date is the starting date.
 EXAMPLE: <%
currentDate = #8/4/99#
newDate = DateAdd("m",3,currentDate)
response.write newDate
%>
<%
currentDate = #12:34:45 PM#
newDate = DateAdd("h",3,currentDate)
response.write newDate
%>
 RESULT: 11/4/99
3:34:45 PM
"m" = "month";
"d" = "day";
If currentDate is in time format then,
"h" = "hour";
"s" = "second";
_______________________________________________________________________________
 
DateDiff()
 FUNCTION: 返回两个日期之间的差值 。
 SYNTAX: DateDiff(timeinterval,date1,date2 [, firstdayofweek ][,
firstweekofyear]])
 ARGUMENTS: timeinterval 表示相隔时间的类型,如“M“表示“月”。
 EXAMPLE: <%
fromDate = #8/4/99#
toDate = #1/1/2000#
response.write "There are " & _
  DateDiff("d",fromDate,toDate) & _
  " days to millenium from 8/4/99."
%>
 RESULT: 从8/4/99 到2000年还有 150 天.
_______________________________________________________________________________
 
Day()
 FUNCTION: 返回一个月的第几日 .
 SYNTAX: Day(date)
 ARGUMENTS: date 是任何有效的日期。 
 EXAMPLE: <%=Day(#8/4/99#)%>
 RESULT: 4
_______________________________________________________________________________
 
FormatCurrency()
 FUNCTION: 返回表达式,此表达式已被格式化为货币值 
 SYNTAX: FormatCurrency(Expression [, Digit ][, LeadingDigit ][, Paren ][,
GroupDigit]]]])
 ARGUMENTS: Digit 指示小数点右侧显示位数的数值。默认值为 -1,指示使用的是
计算机的区域设置; LeadingDigit 三态常数,指示是否显示小数值小数点前面的
零。 
 EXAMPLE: <%=FormatCurrency(34.3456)%>
 RESULT: $34.35
_______________________________________________________________________________
 
FormatDateTime()
 FUNCTION: 返回表达式,此表达式已被格式化为日期或时间
 SYNTAX: FormatDateTime(Date, [, NamedFormat])
 ARGUMENTS: NamedFormat 指示所使用的日期/时间格式的数值,如果省略,则使用
vbGeneralDate.
 EXAMPLE: <%=FormatDateTime("08/4/99", vbLongDate)%>
 RESULT: Wednesday, August 04, 1999
_______________________________________________________________________________
 
FormatNumber()
 FUNCTION: 返回表达式,此表达式已被格式化为数值.
 SYNTAX: FormatNumber(Expression [, Digit ][, LeadingDigit ][, Paren ][,
GroupDigit]]]])
 ARGUMENTS: Digit 指示小数点右侧显示位数的数值。默认值为 -1,指示使用的是
计算机的区域设置。; LeadingDigit i指示小数点右侧显示位数的数值。默认值为 -
1,指示使用的是计算机的区域设置。; Paren 指示小数点右侧显示位数的数值。默认
值为 -1,指示使用的是计算机的区域设置。; GroupDigit i指示小数点右侧显示位数
的数值。默认值为 -1,指示使用的是计算机的区域设置。.
 EXAMPLE: <%=FormatNumber(45.324567, 3)%>
 RESULT: 45.325
_______________________________________________________________________________
 

 
Top
 
 回复人: blueice2002(蓝冰) ( ) 信誉:105  2003-11-08 19:43:21Z  得分:3 
 
 
?
FormatPercent()
 FUNCTION: 返回表达式,此表达式已被格式化为尾随有 % 符号的百分比(乘以
100 )。 (%)
 SYNTAX: FormatPercent(Expression [, Digit ][, LeadingDigit ][, Paren ][,
GroupDigit]]]])
 ARGUMENTS: 同上.
 EXAMPLE: <%=FormatPercent(0.45267, 3)%>
 RESULT: 45.267%
_______________________________________________________________________________
 
Hour()
 FUNCTION: 以24时返回小时数.
 SYNTAX: Hour(time)
 ARGUMENTS: 
 EXAMPLE: <%=Hour(#4:45:34 PM#)%>
 RESULT: 16
(Hour has been converted to 24-hour system)
_______________________________________________________________________________
 
Instr()
 FUNCTION: 返回字符或字符串在另一个字符串中第一次出现的位置.
 SYNTAX: Instr([start, ] strToBeSearched, strSearchFor [, compare])
 ARGUMENTS: Start为搜索的起始值,strToBeSearched接受搜索的字符串 
strSearchFor要搜索的字符.compare比较方式(详细见ASP常数)
 EXAMPLE: <%
strText = "This is a test!!"
pos = Instr(strText, "a")
response.write pos
%>
 RESULT: 9
_______________________________________________________________________________
 
InstrRev()
 FUNCTION: 同上,只是从字符串的最后一个搜索起
 SYNTAX: InstrRev([start, ] strToBeSearched, strSearchFor [, compare])
 ARGUMENTS: 同上.
 EXAMPLE: <%
strText = "This is a test!!"
pos = InstrRev(strText, "s")
response.write pos
%>
 RESULT: 13
_______________________________________________________________________________
 
Int()
 FUNCTION: 返回数值类型,不四舍五入,注意取值是不大于它的整数。
 SYNTAX: Int(number)
 ARGUMENTS: 
 EXAMPLE: <%=INT(32.89)%>  <%=int(-3.33)%>
 RESULT: 32  -4
_______________________________________________________________________________
 
IsArray()
 FUNCTION: 判断一对象是否为数组,返回布尔值 .
 SYNTAX: IsArray(name)
 ARGUMENTS: 
 EXAMPLE: <%
strTest = "Test!"
response.write IsArray(strTest)
%>
 RESULT: False
_______________________________________________________________________________
 
IsDate()
 FUNCTION: 判断一对象是否为日期,返回布尔值
 SYNTAX: IsDate(expression)
 ARGUMENTS: expression is any valid expression.
 EXAMPLE: <%
strTest = "8/4/99"
response.write IsDate(strTest)
%>
 RESULT: True
_______________________________________________________________________________
 
IsEmpty()
 FUNCTION: 判断一对象是否初始化,返回布尔值.
 SYNTAX: IsEmpty(expression)
 ARGUMENTS: 
 EXAMPLE: <%
Dim i
response.write IsEmpty(i)
%>
 RESULT: True
_______________________________________________________________________________
 
IsNull()
 FUNCTION: 判断一对象是否为空,返回布尔值.
 SYNTAX: IsNull(expression)
 ARGUMENTS: 
 EXAMPLE: <%
Dim i
response.write IsNull(i)
%>
 RESULT: False
_______________________________________________________________________________
 
IsNumeric()
 FUNCTION: 判断一对象是否为数字,返回布尔值.
 SYNTAX: IsNumeric(expression)
 ARGUMENTS: 
 EXAMPLE: <%
i = "345"
response.write IsNumeric(i)
%>
 RESULT: True
就算数字加了引号,ASP还是认为它是数字。
_______________________________________________________________________________
 
IsObject()
 FUNCTION: 判断一对象是否为对象,返回布尔值.
 SYNTAX: IsObject(expression)
 ARGUMENTS: 
 EXAMPLE: <%
Set con = Server.CreateObject("ADODB.Connection")
response.write IsObject(con)
%>
 RESULT: True
_______________________________________________________________________________
 
LBound()
 FUNCTION: 返回指定数组维的最小可用下标.
 SYNTAX: Lbound(arrayname [, dimension])
 ARGUMENTS: ; dimension 指明要返回哪一维下界的整数。使用 1 表示第一维,2
表示第二维,以此类推。如果省略 dimension 参数,默认值为 1.
 EXAMPLE: <%
i = Array("Monday","Tuesday","Wednesday")
response.write LBound(i)
%>
 RESULT: 0
_______________________________________________________________________________
 
LCase()
 FUNCTION:  返回字符串的小写形式
 SYNTAX: Lcase(string)
 ARGUMENTS: string is any valid string expression.
 EXAMPLE: <%
strTest = "This is a test!"
response.write LCase(strTest)
%>
 RESULT: this is a test!
_______________________________________________________________________________
 
Left()
 FUNCTION: 返回字符串左边第length个字符以前的字符(含第length个字符).
 SYNTAX: Left(string, length)
 ARGUMENTS: 
 EXAMPLE: <%
strTest = "This is a test!"
response.write Left(strTest, 3)
%>
 RESULT: Thi
_______________________________________________________________________________
 
Len()
 FUNCTION: 返回字符串的长度.
 SYNTAX: Len(string | varName)
 ARGUMENTS: 
 EXAMPLE: <%
strTest = "This is a test!"
response.write Len(strTest)
%>
 RESULT: 15
_______________________________________________________________________________
 
LTrim()
 FUNCTION: 去掉字符串左边的空格.
 SYNTAX: LTrim(string)
 ARGUMENTS: 
 EXAMPLE: <%
strTest = " This is a test!"
response.write LTrim(strTest)
%>
 RESULT: This is a test!
_______________________________________________________________________________
 
Mid()
 FUNCTION: 返回特定长度的字符串(从start开始,长度为length).
 SYNTAX: Mid(string, start [, length])
 ARGUMENTS: 
 EXAMPLE: <%
strTest = "This is a test! Today is Monday."
response.write Mid(strTest, 17, 5)
%>
 RESULT: Today
_______________________________________________________________________________
 
Minute()
 FUNCTION: 返回时间的分钏.
 SYNTAX: Minute(time)
 ARGUMENTS: 
 EXAMPLE: <%=Minute(#12:45:32 PM#)%>
 RESULT: 45
_______________________________________________________________________________
 
Month()
 FUNCTION: 返回日期.
 SYNTAX: Month(date)
 ARGUMENTS: date is any valid date expression.
 EXAMPLE: <%=Month(#08/04/99#)%>
 RESULT: 8
_______________________________________________________________________________
 
MonthName()
 FUNCTION: Returns a string identifying the specified month.
 SYNTAX: MonthName(month, [, Abb])
 ARGUMENTS: month is the numeric representation for a given month; Abb
(optional) is a boolean value used to display month abbreviation. True
will display the abbreviated month name and False (default) will not show
the abbreviation.
 EXAMPLE: <%=MonthName(Month(#08/04/99#))%>
 RESULT: August
_______________________________________________________________________________
 
Now()
 FUNCTION: Returns the current system date and time.
 SYNTAX: Now()
 ARGUMENTS: None
 EXAMPLE: <%=Now%>
 RESULT: 8/4/99 9:30:16 AM
_______________________________________________________________________________
 
Replace()
 FUNCTION: Returns a string in which a specified sub-string has been
replaced with another substring a specified number of times.
 SYNTAX: Replace(strToBeSearched, strSearchFor, strReplaceWith [, start
][, count ][, compare]]])
 ARGUMENTS: strToBeSearched is a string expression containing a sub-
string to be replaced; strSearchFor is the string expression to search for
within strToBeSearched; strReplaceWith is the string expression to replace
sub-string strSearchFor; start (optional) is the numeric character
position to begin search; count (optional) is a value indicating the
comparision constant.
 EXAMPLE: <%
strTest = "This is an apple!"
response.write Replace(strTest, "apple", "orange")
%>
 RESULT: This is an orange!
_______________________________________________________________________________
 
Top
 
 回复人: blueice2002(蓝冰) ( ) 信誉:105  2003-11-08 19:43:43Z  得分:3 
 
 
?
 
Right()
 FUNCTION: 返回字符串右边第length个字符以前的字符(含第length个字符).
 SYNTAX: Right(string, length)
 ARGUMENTS: .
 EXAMPLE: <%
strTest = "This is an test!"
response.write Right(strTest, 3)
%>
 RESULT: st!
_______________________________________________________________________________
 
Rnd()
 FUNCTION: 产生一个随机数.
 SYNTAX: Rnd [ (number) ]
 ARGUMENTS: 
 EXAMPLE: <%
Randomize()
response.write RND()
%>
 RESULT: 任何一个在0 到 1 之间的数
_______________________________________________________________________________
 
Round()
 FUNCTION: 返回按指定位数进行四舍五入的数值.
 SYNTAX: Round(expression [, numRight])
 ARGUMENTS: numRight数字表明小数点右边有多少位进行四舍五入。如果省略,则
Round 函数返回整数.
 EXAMPLE: <%
i = 32.45678
response.write Round(i)
%>
 RESULT: 32
_______________________________________________________________________________
 
Rtrim()
 FUNCTION: 去掉字符串右边的字符串.
 SYNTAX: Rtrim(string)
 ARGUMENTS: 
 EXAMPLE: <%
strTest = "This is a test!! "
response.write RTrim(strTest)
%>
 RESULT: This is a test!!
_______________________________________________________________________________
 
Second()
 FUNCTION: 返回秒.
 SYNTAX: Second(time)
 ARGUMENTS: .
 EXAMPLE: <%=Second(#12:34:28 PM#)%>
 RESULT: 28
 
StrReverse()
 FUNCTION: 反排一字符串
 SYNTAX: StrReverse(string)
 ARGUMENTS: 
 EXAMPLE: <%
strTest = "This is a test!!"
response.write StrReverse(strTest)
%>
 RESULT: !!tset a si sihT
_______________________________________________________________________________
 
Time()
 FUNCTION: 返回系统时间.
 SYNTAX: Time()
 ARGUMENTS: .
 EXAMPLE: <%=Time%>
 RESULT: 9:58:28 AM
_______________________________________________________________________________
 
Trim()
 FUNCTION: 去掉字符串左右的空格.
 SYNTAX: Trim(string)
 ARGUMENTS: string is any valid string expression.
 EXAMPLE: <%
strTest = " This is a test!! "
response.write Trim(strTest)
%>
 RESULT: This is a test!!
_______________________________________________________________________________
 
UBound()
 FUNCTION: 返回指定数组维数的最大可用下标.
 SYNTAX: Ubound(arrayname [, dimension])
 ARGUMENTS: ; dimension (optional) 指定返回哪一维上界的整数。1 表示第一
维,2 表示第二维,以此类推。如果省略 dimension 参数,则默认值为 1.
 EXAMPLE: <%
i = Array("Monday","Tuesday","Wednesday")
response.write UBound(i)
%>
 RESULT: 2
_______________________________________________________________________________
 
UCase()
 FUNCTION: 返回字符串的大写形式.
 SYNTAX: UCase(string)
 ARGUMENTS: 
 EXAMPLE: <%
strTest = "This is a test!!"
response.write UCase(strTest)
%>
 RESULT: THIS IS A TEST!!
_______________________________________________________________________________
 
VarType()
 FUNCTION: 返回指示变量子类型的值
 SYNTAX: VarType(varName)
 ARGUMENTS: 
 EXAMPLE: <%
i = 3
response.write varType(i)
%>
 RESULT: 2(数字)详见"asp常数"
_______________________________________________________________________________
 
WeekDay()
 FUNCTION: 返回在一周的第几天.
 SYNTAX: WeekDay(date [, firstdayofweek])
 ARGUMENTS: .
 EXAMPLE: <%
d = #8/4/99#
response.write Weekday(d)
%>
 RESULT: 4(星期三)
_______________________________________________________________________________
 
WeekDayName()
 FUNCTION: 返回一周第几天的名字.
 SYNTAX: WeekDayName(weekday [, Abb ][, firstdayofweek]])
 ARGUMENTS: Abb可选。Boolean 值,指明是否缩写表示星期各天的名称。如果省
略, 默认值为 False,即不缩写星期各天的名称.firstdayofweek指明星期第一天的
数值
 EXAMPLE: <%
d = #8/4/99#
response.write WeekdayName(Weekday(d))
%>
 RESULT: Wednesday
_______________________________________________________________________________
 
Year()
 FUNCTION: 返回当前的年份.
 SYNTAX: Year(date)
 ARGUMENTS: 
 EXAMPLE: <%=Year(#8/4/99#)%>
 RESULT: 1999 
_______________________________________________________________________________
_______________________________________________________________________________
_______________________________________________________________________________
_______________________________________________________________________________

 
Top
 
 回复人: maodongran321(毛毛) ( ) 信誉:100  2003-11-08 19:43:55Z  得分:0 
 
 
?
真好!
顶!
 
Top
 
 回复人: blueice2002(蓝冰) ( ) 信誉:105  2003-11-08 19:55:34Z  得分:0 
 
 
?
http://hshlin.8u8.com/help/help j script.txt
太长了,发了好多遍都发不上.
 
Top
 
 回复人: Jaron(唐伯虎点蚊香) ( ) 信誉:317  2003-11-10 01:50:58Z  得分:3 
 
 
?
分    类:语法应用
问题描述:查找两个字符串间的字符出现次数
解决办法:
function FindStringTimes(strContent,start_string,end_string) 'start_string 与 end_string 之间字符出次的数
'written by Jaron
 FindStringTimes = ubound(split(strContent,start_string))
end function
示例: 查找以下字符串有多少张图片
response.write FindStringTimes(HTML,"<img",">")
<img src="a.jpg"><img src="b.jpg"><img src="d.jpg"><img src="c.jpg">
 
Top
 
 回复人: vivisogood(新人类~~~~(Fuck 小日本~~)) ( ) 信誉:100  2003-11-10 08:15:59Z  得分:3 
 
 
?
遍历目录以及目录下文件的函数
<%
function bianli(path)
set fso=server.CreateObject("scripting.filesystemobject")
on error resume next
set objFolder=fso.GetFolder(path)
set objSubFolders=objFolder.Subfolders
for each objSubFolder in objSubFolders 
nowpath=path + "/" + objSubFolder.name
Response.Write nowpath
set objFiles=objSubFolder.Files
for each objFile in objFiles
Response.Write "<br>---"
Response.Write objFile.name
next
Response.Write "<p>"
bianli(nowpath)'递归
next 
set objFolder=nothing
set objSubFolders=nothing
set fso=nothing
end function
%>
<%
bianli("d:") '遍历d:盘
%>
 
Top
 
 回复人: vivisogood(新人类~~~~(Fuck 小日本~~)) ( ) 信誉:100  2003-11-10 08:17:53Z  得分:0 
 
 
?
生成一个不重复的随即数字
Sub CalCaPiao()
Dim strCaiPiaoNoArr() As String
Dim strSQL As String
Dim strCaiPiaoNo As String
strCaiPiaoNo = "01,02,03,04,05,06,07,08,09,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33"
Dim StrTempArr(7) As String
Dim strZhongJiangArr(7) As String
strCaiPiaoNoArr = Split(strCaiPiaoNo, ",")
Dim intRand As Integer
Dim i As Integer
Dim j As Integer
i = 0
Dim find As Boolean
Do While True
find = False
Randomize
intRand = Int((33 * Rnd) + 1)
For j = 0 To i - 1
If StrTempArr(j) = CStr(intRand) Then
find = True
End If
Next
If Not find Then
StrTempArr(j) = CStr(intRand)
strZhongJiangArr(i) = CStr(intRand)
'Text1(i) = strZhongJiangArr(i)
i = i + 1
If i = 7 Then
Exit Do
End If
End If
Loop
End Sub
 
Top
 
 回复人: yonghengdizhen(等季节一过,繁花就凋落) ( ) 信誉:127  2003-11-10 09:15:10Z  得分:0 
 
 
?
to  superdullwolf(超级大笨狼) ( ) //*************这里有必要用Stream吗?
 
 
下载任何文件(尤其是IE关联打开的)
<%
Dim Stream
Dim Contents
Dim FileName
Dim FileExt
Const adTypeBinary = 1
FileName = Request.QueryString("FileName")
if FileName = "" Then
    Response.Write "无效文件名."
    Response.End
End if
' 下面是不希望下载的文件
FileExt = Mid(FileName, InStrRev(FileName, ".") + 1)
Select Case UCase(FileExt)
    Case "ASP", "ASA", "ASPX", "ASAX", "MDB"
        Response.Write "受保护文件,不能下载."
        Response.End
End Select
' 下载这个文件
Response.Clear
Response.ContentType = "application/octet-stream"
Response.AddHeader "content-disposition", "attachment; filename=" & FileName
Set Stream = server.CreateObject("ADODB.Stream")
Stream.Type = adTypeBinary
Stream.Open
Stream.LoadFromFile Server.MapPath(FileName)
While Not Stream.EOS
    Response.BinaryWrite Stream.Read(1024 * 64)
Wend
Stream.Close
Set Stream = Nothing
Response.Flush
Response.End
%>

 
 

 
Top
 
 回复人: thpht(海天一色) ( ) 信誉:100  2003-11-10 10:23:06Z  得分:3 
 
 
?
27.背景色变换
<form>
<p><input TYPE="button" value="背景色变换" onClick="BgButton()"></p>
</form>
<script>function BgButton(){
if (document.bgColor==#00ffff)
{document.bgColor=#ffffff;}
else{document.bgColor=#00ffff;}
}
</script> 
28.点击打开新窗口
<form>
<p><input TYPE="button" value="打开新窗口" onCLICK="NewWindow()"></p>
</form>
<script language="javascript"><!--
function NewWindow(){window.open("http://www.mcmx.com";;;,"","height=240,width=340,status=no,location=no,toolbar=no,directories=no,menubar=no");}
// --></script></body>
29.分页代码:
<%本程序文件名为:Pages.asp%>
<%包含ADO常量表文件adovbs.inc,可从"/Program Files/Common Files/System/ADO"目录下拷贝%>
<!--#Include File="adovbs.inc"-->
<%*建立数据库连接,这里是Oracle8.05数据库
Set conn=Server.CreateObject("ADODB.Connection")
conn.Open "Provider=msdaora.1;Data Source=YourSrcName;User ID=YourUserID;Password=YourPassword;"  
Set rs=Server.CreateObject("ADODB.Recordset") 创建Recordset对象
rs.CursorLocation=adUseClient 设定记录集指针属性
*设定一页内的记录总数,可根据需要进行调整
rs.PageSize=10  
*设置查询语句 
StrSQL="Select ID,姓名,住址,电话 from 通讯录 Order By ID"
rs.Open StrSQL,conn,adOpenStatic,adLockReadOnly,adCmdText
%>
<HTML>
<HEAD>
<title>分页示例</title>
<script language=javascript>
//点击"[第一页]"时响应:
function PageFirst()
{
document.MyForm.CurrentPage.selectedIndex=0;
document.MyForm.CurrentPage.onchange();
}
//点击"[上一页]"时响应:
function PagePrior()
{
document.MyForm.CurrentPage.selectedIndex--;
document.MyForm.CurrentPage.onchange();
}
//点击"[下一页]"时响应:
function PageNext()
{
document.MyForm.CurrentPage.selectedIndex++;
document.MyForm.CurrentPage.onchange();
}
//点击"[最后一页]"时响应:
function PageLast()
{
document.MyForm.CurrentPage.selectedIndex=document.MyForm.CurrentPage.length-1;
document.MyForm.CurrentPage.onchange();
}
//选择"第?页"时响应:
function PageCurrent()
{ //Pages.asp是本程序的文件名
document.MyForm.action=Pages.asp?Page=+(document.MyForm.CurrentPage.selectedIndex+1)
document.MyForm.submit();
}
</Script>
</HEAD>
<BODY bgcolor="#ffffcc" link="#008000" vlink="#008000" alink="#FF0000""> 
<%IF rs.Eof THEN
Response.Write("<font size=2 color=#000080>[数据库中没有记录!]</font>")
ELSE
指定当前页码
If Request("CurrentPage")="" Then
rs.AbsolutePage=1
Else
rs.AbsolutePage=CLng(Request("CurrentPage"))
End If  
创建表单MyForm,方法为Get
Response.Write("<form method=Get name=MyForm>")
Response.Write("<p align=center><font size=2 color=#008000>")
设置翻页超链接
if rs.PageCount=1 then
Response.Write("[第一页] [上一页] [下一页] [最后一页] ")
else
if rs.AbsolutePage=1 then
Response.Write("[第一页] [上一页] ")
Response.Write("[<a href=java script:PageNext()>下一页</a>] ")
Response.Write("[<a href=java script:PageLast()>最后一页</a>] ")
else
if rs.AbsolutePage=rs.PageCount then
Response.Write("[<a href=java script:PageFirst()>第一页</a>] ")
Response.Write("[<a href=java script:PagePrior()>上一页</a>] ")
Response.Write("[下一页] [最后一页] ")
else
Response.Write("[<a href=java script:PageFirst()>第一页</a>] ")
Response.Write("[<a href=java script:PagePrior()>上一页</a>] ")
Response.Write("[<a href=java script:PageNext()>下一页</a>] ")
Response.Write("[<a href=java script:PageLast()>最后一页</a>] ")
end if
end if
end if 
创建下拉列表框,用于选择浏览页码
Response.Write("第<select size=1 name=CurrentPage οnchange=PageCurrent()>")
For i=1 to rs.PageCount
if rs.AbsolutePage=i then
Response.Write("<option selected>"&i&"</option>") 当前页码
else
Response.Write("<option>"&i&"</option>")
end if
Next
Response.Write("</select>页/共"&rs.PageCount&"页 共"&rs.RecordCount&"条记录</font><p>")
Response.Write("</form>") 
创建表格,用于显示
Response.Write("<table align=center cellspacing=1 cellpadding=1 border=1")
Response.Write(" bordercolor=#99CCFF bordercolordark=#b0e0e6 bordercolorlight=#000066>") 
Response.Write("<tr bgcolor=#ccccff bordercolor=#000066>")  
Set Columns=rs.Fields  
显示表头
For i=0 to Columns.Count-1
Response.Write("<td align=center width=200 height=13>")
Response.Write("<font size=2><b>"&Columns(i).name&"</b></font></td>")
Next
Response.Write("</tr>")
显示内容
For i=1 to rs.PageSize
Response.Write("<tr bgcolor=#99ccff bordercolor=#000066>")
For j=0 to Columns.Count-1
Response.Write("<td><font size=2>"&Columns(j)&"</font></td>")
Next
Response.Write("</tr>") 
rs.movenext 
if rs.EOF then exit for
Next 
Response.Write("</table>")  
END IF
%>
</BODY>
</HTML>
 
Top
 
 回复人: fangpeng2003(阿房公(blog.ahfun.net)) ( ) 信誉:105  2003-11-10 17:35:05Z  得分:3 
 
 
?
<script language="javascript">
function LogicalValue(ObjStr,ObjType)
{
var str='';
if ((ObjStr==null) || (ObjStr=='') || ObjType==null)
{
alert('函数LogicalValue缺少参数');
return false;
}
var obj = document.all(ObjStr);
if (obj.value=='') return false;
for (var i=2;i<arguments.length;i++)
{
if (str!='')
str += ',';
str += 'arguments['+i+']';
}
str=(str==''?'obj.value':'obj.value,'+str);
var temp=ObjType.toLowerCase();
if (temp=='integer')
{
return eval('IsInteger('+str+')');
}
else if (temp=='number')
{
return eval('IsNumber('+str+')');
}
else if (temp=='string')
{
return eval('SpecialString('+str+')');
}
else if (temp=='date')
{
return eval('IsDate('+str+')');
}
else
{
alert('"'+temp+'"类型在现在版本中未提供');
return false;
}
}
/**
IsInteger: 用于判断一个数字型字符串是否为整形,
还可判断是否是正整数或负整数,返回值为true或false
string: 需要判断的字符串
sign: 若要判断是正负数是使用,是正用'+',负'-',不用则表示不作判断
Author: PPDJ
sample:
var a = '123';
if (IsInteger(a))
{
alert('a is a integer');
}
if (IsInteger(a,'+'))
{
alert(a is a positive integer);
}
if (IsInteger(a,'-'))
{
alert('a is a negative integer');
}
*/
function IsInteger(string ,sign)
{
var integer;
if ((sign!=null) && (sign!='-') && (sign!='+'))
{
alert('IsInter(string,sign)的参数出错:/nsign为null或"-"或"+"');
return false;
}
integer = parseInt(string);
if (isNaN(integer))
{
return false;
}
else if (integer.toString().length==string.length)
{
if ((sign==null) || (sign=='-' && integer<0) || (sign=='+' && integer>0))
{
return true;
}
else
return false;
}
else
return false;
}
/**
IsDate: 用于判断一个字符串是否是日期格式的字符串
返回值:
true或false
参数:
DateString: 需要判断的字符串
Dilimeter : 日期的分隔符,缺省值为'-'
Author: PPDJ
sample:
var date = '1999-1-2';
if (IsDate(date))
{
alert('You see, the default separator is "-");
}
date = '1999/1/2";
if (IsDate(date,'/'))
{
alert('The date/'s separator is "/");
}
*/
function IsDate(DateString , Dilimeter)
{
if (DateString==null) return false;
if (Dilimeter=='' || Dilimeter==null)
Dilimeter = '-';
var tempy='';
var tempm='';
var tempd='';
var tempArray;
if (DateString.length<8 && DateString.length>10)
return false;
tempArray = DateString.split(Dilimeter);
if (tempArray.length!=3)
return false;
if (tempArray[0].length==4)
{
tempy = tempArray[0];
tempd = tempArray[2];
}
else
{
tempy = tempArray[2];
tempd = tempArray[1];
}
tempm = tempArray[1];
var tDateString = tempy + '/'+tempm + '/'+tempd+' 8:0:0';//加八小时是因为我们处于东八区
var tempDate = new Date(tDateString);
if (isNaN(tempDate))
return false;
if (((tempDate.getUTCFullYear()).toString()==tempy) && (tempDate.getMonth()==parseInt(tempm)-1) && (tempDate.getDate()==parseInt(tempd)))
{
return true;
}
else
{
return false;
}
}
/**
IsNumber: 用于判断一个数字型字符串是否为数值型,
还可判断是否是正数或负数,返回值为true或false
string: 需要判断的字符串
sign: 若要判断是正负数是使用,是正用'+',负'-',不用则表示不作判断
Author: PPDJ
sample:
var a = '123';
if (IsNumber(a))
{
alert('a is a number');
}
if (IsNumber(a,'+'))
{
alert(a is a positive number);
}
if (IsNumber(a,'-'))
{
alert('a is a negative number');
}
*/
function IsNumber(string,sign)
{
var number;
if (string==null) return false;
if ((sign!=null) && (sign!='-') && (sign!='+'))
{
alert('IsNumber(string,sign)的参数出错:/nsign为null或"-"或"+"');
return false;
}
number = new Number(string);
if (isNaN(number))
{
return false;
}
else if ((sign==null) || (sign=='-' && number<0) || (sign=='+' && number>0))
{
return true;
}
else
return false;
}
/**
SpecialString: 用于判断一个字符串是否含有或不含有某些字符
返回值:
true或false
参数:
string : 需要判断的字符串
compare : 比较的字符串(基准字符串)
BelongOrNot: true或false,“true”表示string的每一个字符都包含在compare中,
“false”表示string的每一个字符都不包含在compare中
Author: PPDJ
sample1:
var str = '123G';
if (SpecialString(str,'1234567890'))
{
alert('Yes, All the letter of the string in /'1234567890/'');
}
else
{
alert('No, one or more letters of the string not in /'1234567890/'');
}
结果执行的是else部分
sample2:
var password = '1234';
if (!SpecialString(password,'/'"@#$%',false))
{
alert('Yes, The password is correct.');
}
else
{
alert('No, The password is contain one or more letters of /'"@#$%/'');
}
结果执行的是else部分
*/
function SpecialString(string,compare,BelongOrNot)
{
if ((string==null) || (compare==null) || ((BelongOrNot!=null) && (BelongOrNot!=true) && (BelongOrNot!=false)))
{
alert('function SpecialString(string,compare,BelongOrNot)参数错误');
return false;
}
if (BelongOrNot==null || BelongOrNot==true)
{
for (var i=0;i<string.length;i++)
{
if (compare.indexOf(string.charAt(i))==-1)
return false
}
return true;
}
else
{
for (var i=0;i<string.length;i++)
{
if (compare.indexOf(string.charAt(i))!=-1)
return false
}
return true;
}
}

//-->
</script>

 
Top
 
 回复人: hitywt(べ_べ) ( ) 信誉:99  2003-11-10 20:31:05Z  得分:2 
 
 
?
看了大家这么多,我也来一个
xphome版的用不了IIS,我提供一个方法让xphome版支持ASP
方法如下:
apache2.0.47 + sun one asp server 4.0
URL http://ftp.e-tax.com.cn/show.php?id=255&down=1   apache2.0.47
URL http://wwws.sun.com/software/chilisoft/          sun one asp server 4.0
先装apache2.0.47
再装sun one asp server 4.0
默认就行,我现在就用的是这个,效率还行。
 
Top
 
 回复人: y7967(走猫的路,让狗说去吧) ( ) 信誉:109  2003-11-11 11:45:48Z  得分:2 
 
 
?
前几天也碰到WindowsXP装iis的问题,最后成功安装,所以把这篇文章贴出来,可能比较简单,但希望对大家有帮助:
==============================================
WindowsXP家用版操作系统也能安装IIS
2002-12-23 10:25:21  
太平洋电脑网 提供以下内容
作者:黄加乐/整理  
   事前准备
  1、Windows XP HomeEdit 中文版 CD(拷在硬盘也可以)
  2、Windows 2000 Advanced Server CD(最好也是中文版)
  3、默认你的XP是安装在C:/WINDOWS下
  开始动手
  (如果你怕改错,先把C:/WINDOWS/INF/SYSOC.INF做一份备份)
  用记事本打开C:/WINDOWS/INF/SYSOC.INF,在[COMPONENTS]下找到一行:
  iis=iis.dll,OcEntry,iis.inf,hide,7
  然后把它改成 
  iis=iis2.dll,OcEntry,iis2.inf,,7
  保存。
  然后把Windows 2000 Advanced Server CD里的两个文件IIS.DL_和IIS.IN_拷贝到一个临
时的目录(例如C:/AAA),然后在命令提示符状态下将当前目录转到C:/AAA,执行
  EXPAND IIS.DL_ IIS2.DLL
  EXPAND IIS.IN_ IIS2.INF
  解出IIS2.DLL及IIS2.INF两个文件,将IIS2.INF复制到C:/WINDOWS/INF目录下,将IIS2
.DLL 复制到C:/WINDOWS/SYSTEM32/SETUP目录下。
  现在按“开始->设置->控制面板->添加或删除程序->添加/删除Windows组件”,这时你
可以很兴奋地发现IIS出现了!!!
  此后的过程就和PRO版的XP安装IIS差不多了,过程中会要求你选择Windows 2000 Advan
ced Server光盘和Windows XP HomeEdit光盘的位置,输入指定的目录即可正常安装。
  安装完毕以后还不能直接用的,需要对IIS进行一些设置:
  控制面板->管理工具->Internet服务管理器
  然后点“默认WEB站点”的右键,转到“目录安全性”选项卡,点“匿名访问和验证控制
”的“编辑”按钮,会弹出匿名方法新窗口,再点击其中“匿名访问”中的“编辑”按钮,将
“允许IIS控制密码”全面的勾去掉,然后一路确定返回即可。

 
Top
 
 回复人: haoyipeng(呵呵虫) ( ) 信誉:100  2003-11-11 12:07:43Z  得分:0 
 
 
?
好东西啊!
坚决支持
 
Top
 
 回复人: peilianhai(网侠) ( ) 信誉:100  2003-11-12 13:56:51Z  得分:2 
 
 
?
我的2000en怎么拷贝不了中文啊!
操作文件:
FILE
myfile=server.CreateObject("scripting.filesystemobject")
建立文件
myfile.CreateTextFile ("G:/haier/upload/test.txt")
拷贝文件
myfile.CopyFile "G:/haier/upload/test.txt","G:/haier/upload/test1.txt",1
移动文件
myfile.MoveFile "G:/haier/upload/test.txt","G:/haier/upload/test1.txt"
删除文件
myfile.DeleteFile "G:/haier/upload/test1.txt"
获取文件
set afile=myfile.GetFile("G:/haier/upload/test.txt")
属性
name path drive size type attributes
datelastaccessed datelastmodified
显示所有文件
set myfolder=myfile.GetFolder("G:/haier/upload")
for each thing in myfolder.files
response.write thing
next
 
Top
 
 回复人: blueice2002(蓝冰) ( ) 信誉:105  2003-11-12 14:09:20Z  得分:5 
 
 
?
http://hongwen.Y365.com/asp question.rar
花了一个小时,把上面的一些代码简单整理了一下,其实也说不上整理吧,只是简单copy下来了,和大家共享,方便大家收集!
 
Top
 
 回复人: blueice2002(蓝冰) ( ) 信誉:105  2003-11-12 14:12:29Z  得分:0 
 
 
?
等有时间了做个chm文件。
 
Top
 
 回复人: windancer(^_^) ( ) 信誉:110  2003-11-12 17:46:34Z  得分:2 
 
 
?
blueice2002(蓝冰)兄,如果你有公网空间可以利用的,我有一些chm格式的手册,可以提供给一些没有的人下载
大致列表如下:
asp.chm
html.chm
css.chm
jscript55.chm
vbscript5.chm
MsSql.chm    (sql语法)
wsh.chm
C#.chm
vb_net.chm
ado.chm
iis.chm

 
Top
 
 回复人: blueice2002(蓝冰) ( ) 信誉:105  2003-11-13 10:11:33Z  得分:0 
 
 
?
公网到没有,只是自己以前申请的免费空间,
一个是
www.8u8.com
www.y365.com
共40M

 
Top
 
 回复人: 007james(苏乞儿) ( ) 信誉:100  2003-11-13 10:14:44Z  得分:2 
 
 
?
表格排序
表格排序是对表格而言的,与表格的生成无关。就是说,无论用何种方式产生的表格排序时都一样。这是排序函数,很简单。
分升序和降序,要求传入参数:obj 表格名或id; n 排序列,第一列为0
<script>
function table_sort_asc(obj,n) {
  var i,j;
  var tab = eval("document.all."+obj);
  if(tab.tagName != "TABLE") return;
  for(i=0;i<tab.rows.length-1;i++)
 for(j=i+1;j<tab.rows.length;j++)
  if(tab.rows[i].cells[n].innerHTML > tab.rows[j].cells[n].innerHTML)
   tab.rows[i].swapNode(tab.rows[j]);
}
function table_sort_desc(obj,n) {
  var i,j;
  var tab = eval("document.all."+obj);
  if(tab.tagName != "TABLE") return;
  for(i=0;i<tab.rows.length-1;i++)
 for(j=i+1;j<tab.rows.length;j++)
  if(tab.rows[i].cells[n].innerHTML < tab.rows[j].cells[n].innerHTML)
   tab.rows[i].swapNode(tab.rows[j]);
}
</script>

 
Top
 
 回复人: 007james(苏乞儿) ( ) 信誉:100  2003-11-13 10:16:15Z  得分:2 
 
 
?
<html>
<head>
<script>
//方法1:
function sorttable(){
 var arrEnd = [];
 var arrNotBegin = [];
 
 for (i=0; i < document.all.table1.rows.length; i++) {
  var oTr = new Object();
        for (j=0; j < document.all.table1.rows(i).cells.length; j++) {
   var strNode = document.all.table1.rows(i).cells(j).innerText;
   switch(j)
   {
    case 0:
     oTr.time = strNode;
     break;
    case 1:
     oTr.state = strNode;
     break;
    case 2:
     oTr.topic = strNode;
     break;
    default:
     break;               
    
   }   
        }
        if(oTr.state == "未开始")
        {
   arrNotBegin[arrNotBegin.length] = oTr;
        }else{
   arrEnd[arrEnd.length] = oTr;       
        }               
    }
   
    arrNotBegin.sort(function(){var a1=arguments[0];var a2=arguments[1];if(a1.time>a2.time){return 1}else if(a1.time<a2.time){return -1}else{return 0}});
    arrEnd.sort(function(){var a1=arguments[0];var a2=arguments[1];if(a1.time>a2.time){return 1}else if(a1.time<a2.time){return -1}else{return 0}});
   
    var strTable = "<table id='table1'  border='1'>";
 for(var j=0; j<arrNotBegin.length; j++){
   strTable += "<tr>";
   strTable += "<td>" + arrNotBegin[j].time + "</td>";
   strTable += "<td>" + arrNotBegin[j].state + "</td>";    
   strTable += "<td>" + arrNotBegin[j].topic + "</td>";    
   strTable += "</tr>";
    }
   
 for(var j=0; j<arrEnd.length; j++){
   strTable += "<tr>";
   strTable += "<td>" + arrEnd[j].time + "</td>";
   strTable += "<td>" + arrEnd[j].state + "</td>";    
   strTable += "<td>" + arrEnd[j].topic + "</td>";    
   strTable += "</tr>";
    }   
    strTable += "</table>"
 document.all.table1.outerHTML = strTable;
}

//方法2:
//这里的td表示要排序的列
function sorttable(){
 var xmldoc = new ActiveXObject("Microsoft.XMLDOM");
 xmldoc.async = false;
    xmldoc.loadXML(document.all.table1.innerHTML);
   
 var xsldoc = new ActiveXObject("Microsoft.XMLDOM");      
 xsldoc.async = false;
 var strxsl = '' +   
     '<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">' +
     '<xsl:template match="/TBODY">' + 
     ' <xsl:for-each select="TR" >' +         
     '  <xsl:sort select="TD[2]" order="descending"/>' +
     '  <xsl:sort select="TD[1]" />' +
         '  <xsl:copy>' +
         '   <xsl:apply-templates select="@*|node()" />' +
         '  </xsl:copy>' +
     ' </xsl:for-each>' +   
     '</xsl:template>' +  
     '<xsl:template match="@*|node()">' +
        ' <xsl:copy>' +
        '  <xsl:apply-templates select="@*|node()" />' +
        ' </xsl:copy>' +
     '</xsl:template>' +  
     '</xsl:stylesheet>'   
    xsldoc.loadXML(strxsl);
    var a = xmldoc.transformNode(xsldoc);
    a = a.substring(39);
 document.all.table1.outerHTML = '<table id="table1">' + a + '</table>';
}
</script>
</head>
<body>
<table id="table1" border="1">
<tr>
  <td>22:30</td>
  <td>未开始</td>
  <td>倩女幽魂</td>
</tr>
<tr>
  <td>21:30</td>
  <td>未开始</td>
  <td>TV三贱客</td>
</tr>
<tr>
  <td>20:30</td>
  <td>完</td>
  <td>娱乐串串烧</td>
</tr>
<tr>
  <td>23:30</td>
  <td>未开始</td>
  <td>篮球大本营</td>
</tr>
<tr>
  <td>22:15</td>
  <td>未开始</td>
  <td>新闻时间</td>
</tr>
</table>
<input type="button" value="排序" οnclick="sorttable();">
</body>
</html>

 
Top
 
 回复人: leon168(无尽网络) ( ) 信誉:100  2003-11-13 10:19:57Z  得分:0 
 
 
?
我的论坛不知道可不可以上载???
http://bbs.osboard.com
能放上去就放上去.....
 
Top
 
 回复人: iamsangster(浪人) ( ) 信誉:100  2003-11-13 10:32:15Z  得分:0 
 
 
?
支持

 
Top
 
 回复人: mjm0928(一搏) ( ) 信誉:75  2003-11-13 10:59:25Z  得分:0 
 
 
?
太好了,收藏!
有没有从库里读出信息生成静态页面,然后调用的程序????
非常感谢!
 
Top
 
 回复人: dczlxl(野猫) ( ) 信誉:75  2003-11-13 18:29:43Z  得分:0 
 
 
?
收藏!
 
Top
 
 回复人: KOON(卢云) ( ) 信誉:109  2003-11-14 12:33:06Z  得分:0 
 
 
?
我想作个CHM出来,但是不知道怎么分类,哪位兄弟给个参考可好?
 
Top
 
 回复人: inelm(木野狐) ( ) 信誉:133  2003-11-14 13:57:24Z  得分:0 
 
 
?
点击 “FAQ", 参考一下 asp 版 faq 的分类方法
 
Top
 
 回复人: zou_cz(seamoon) ( ) 信誉:98  2003-11-14 15:54:30Z  得分:0 
 
 
?
mark
 
Top
 
 回复人: hfwpq(hf民工) ( ) 信誉:100  2003-11-16 22:59:45Z  得分:2 
 
 
?
还原SQL:
path="c:/backup.bak"
sql="RESTORE FILELISTONLY FROM DISK ="&path
conn.execute sql
 
我在使用CONN数据库连接对象执行SQL还原语句时,老是提示
[Microsoft][ODBC SQL Server Driver][SQL Server]因为数据库正在使用,所以未能获得对数据库的排它访问权。
我不想用ODBC,太慢了,代码多。能不能解决上述错误。谢谢各位大虾了!
 
Top
 
 回复人: anita2li(hehe...) ( ) 信誉:101  2003-11-17 08:53:04Z  得分:0 
 
 
?
UP
 
Top
 
 回复人: TT008(T T) ( ) 信誉:100  2003-11-18 08:40:35Z  得分:0 
 
 
?
study
 
Top
 
 回复人: junki(『打破沙锅问到底』) ( ) 信誉:100  2003-11-18 15:21:12Z  得分:0 
 
 
?
楼主真的是好心肠……
绝对收藏
:)
 
Top
 
 回复人: julong88(宝蓝-专心做好每一个工程) ( ) 信誉:95  2003-11-18 17:13:26Z  得分:0 
 
 
?
编辑起来不次于delphi里的葵花宝典
 
Top
 
 回复人: yonghengdizhen(等季节一过,繁花就凋落) ( ) 信誉:127  2003-11-18 22:18:08Z  得分:0 
 
 
?
to hfwpq(hf民工)
你不能连接到待还原的数据库上
你应该连到master库然后进行还原
 
Top
 
 回复人: hfwpq(hf民工) ( ) 信誉:100  2003-11-19 00:53:46Z  得分:0 
 
 
?
是呀,这个我知道,在查询分析器里也是这样。蠢呀!其实页面上的菜单就是从数据库里取的,你说占用不占用,哈哈哈哈!一直在占用啊!所以恢复数据库的页面要open一个单独的页面,且close父页面。
 
Top
 
 回复人: monkeys(石猴.net) ( ) 信誉:100  2003-11-19 10:31:21Z  得分:5 
 
 
?
1、〖打开〗命令的实现
  [格式]:document.execCommand("open")
  [说明]这跟VB等编程设计中的webbrowser控件中的命令有些相似,大家也可依此琢磨琢磨。
  [举例]在<body></body>之间加入:
  <a href="#" οnclick=document.execCommand("open")>打开</a>
  2、〖使用 记事本 编辑〗命令的实现
  [格式]:location.replace("view-source:"+location)
  [说明]打开记事本,在记事本中显示该网页的源代码。
  [举例]在<body></body>之间加入:
  <a href="#" οnclick=location.replace("view-source:"+location)>使用 记事本 编辑</a>
  3、〖另存为〗命令的实现
  [格式]:document.execCommand("saveAs")
  [说明]将该网页保存到本地盘的其它目录!
  [举例]在<body></body>之间加入:
  <a href="#" οnclick=document.execCommand("saveAs")>另存为</a>
  4、〖打印〗命令的实现
  [格式]:document.execCommand("print")
  [说明]当然,你必须装了打印机!
  [举例]在<body></body>之间加入:
  <a href="#" οnclick=document.execCommand("print")>打印</a>
  5、〖关闭〗命令的实现
  [格式]:window.close();return false
  [说明]将关闭本窗口。
  [举例]在<body></body>之间加入:
  <a href="#" οnclick=window.close();return false)>关闭本窗口</a>

二、【编辑(E)】菜单中的命令的实现
  〖全选〗命令的实现
  [格式]:document.execCommand("selectAll")
  [说明]将选种网页中的全部内容!
  [举例]在<body></body>之间加入:
  <a href="#" οnclick=document.execCommand("selectAll")>全选</a>
  三、【查看(V)】菜单中的命令的实现
  1、〖刷新〗命令的实现
  [格式]:location.reload() 或 history.go(0)
  [说明]浏览器重新打开本页。
  [举例]在<body></body>之间加入:
  <a href="#" οnclick=location.reload()>刷新</a>
  或加入:<a href="#" οnclick=history.go(0)>刷新</a>
  2、〖源文件〗命令的实现
  [格式]:location.replace("view-source:"+location)
  [说明]查看该网页的源代码。
  [举例]在<body></body>之间加入:
  <a href="#" οnclick=location.replace("view-source:"+location)>查看源文件</a>

  3、〖全屏显示〗命令的实现
  [格式]:window.open(document.location,"url","fullscreen")
  [说明]全屏显示本页。
  [举例]在<body></body>之间加入:
  <a href="#" οnclick=window.open(document.location,"url","fullscreen")>全屏显示</a>

四、【收藏(A)】菜单中的命令的实现
  1、〖添加到收藏夹〗命令的实现
  [格式]:window.external.AddFavorite('url', '“网站名”)
  [说明]将本页添加到收藏夹。
  [举例]在<body></body>之间加入:
  <a href="javascript:window.external.AddFavorite('http://oh.jilinfarm.com', '胡明新的个人主页')">添加到收藏夹</a>
  2、〖整理收藏夹〗命令的实现
  [格式]:window.external.showBrowserUI("OrganizeFavorites",null)
  [说明]打开整理收藏夹对话框。
  [举例]在<body></body>之间加入:
  <a href="#" οnclick=window.external.showBrowserUI("OrganizeFavorites",null)>整理收藏夹</a>
  五、【工具(T)】菜单中的命令的实现
  〖internet选项〗命令的实现
  [格式]:window.external.showBrowserUI("PrivacySettings",null)
  [说明]打开internet选项对话框。
  [举例]在<body></body>之间加入:
  <a href="#" οnclick=window.external.showBrowserUI("PrivacySettings",null)>internet选项</a>

六、【工具栏】中的命令的实现
  1、〖前进〗命令的实现
  [格式]history.go(1) 或 history.forward()
  [说明]浏览器打开后一个页面。
  [举例]在<body></body>之间加入:
  <a href="#" οnclick=history.go(1)>前进</a>
  或加入:<a href="#" οnclick=history.forward()>前进</a>
  2、〖后退〗命令的实现
  [格式]:history.go(-1) 或 history.back()
  [说明]浏览器返回上一个已浏览的页面。
  [举例]在<body></body>之间加入:
  <a href="#" οnclick=history.go(-1)>后退</a>
  或加入:<a href="#" οnclick=history.back()>后退</a>
  3、〖刷新〗命令的实现
  [格式]:document.reload() 或 history.go(0)
  [说明]浏览器重新打开本页。
  [举例]在<body></body>之间加入:
  <a href="#" οnclick=location.reload()>刷新</a>
  或加入:<a href="#" οnclick=history.go(0)>刷新</a>
  七、其它命令的实现
  〖定时关闭本窗口〗命令的实现
  [格式]:settimeout(window.close(),关闭的时间)
  [说明]将关闭本窗口。
  [举例]在<body></body>之间加入:
  <a href="#" οnclick=setTimeout(window.close(),3000)>3秒关闭本窗口</a>
  如果大家还整理出其他用Javascript实现的命令,不妨投稿来和大家分享。
  【附】为了方便读者,下面将列出所有实例代码,你可以把它们放到一个html文件中,然后预览效果。html文件下载。
  <a href="#" οnclick=document.execCommand("open")>打开</a><br>
  <a href="#" οnclick=location.replace("view-source:"+location)>使用 记事本 编辑</a><br>
  <a href="#" οnclick=document.execCommand("saveAs")>另存为</a><br>
  <a href="#" οnclick=document.execCommand("print")>打印</a><br>
  <a href="#" οnclick=window.close();return false)>关闭本窗口</a><br>
  <a href="#" οnclick=document.execCommand("selectAll")>全选</a><br>
  <a href="#" οnclick=location.reload()>刷新</a><a href="#" οnclick=history.go(0)>刷新</a><br>
  <a href="#" οnclick=location.replace("view-source:"+location)>查看源文件</a> <br>
  <a href="#" οnclick=window.open(document.location,"url","fullscreen")>全屏显示</a> <br>
  <a href="javascript:window.external.AddFavorite('http://homepage.yesky.com', '天极网页陶吧')">添加到收藏夹</a> <br>
  <a href="#" οnclick=window.external.showBrowserUI("OrganizeFavorites",null)>整理收藏夹</a> <br>
  <a href="#" οnclick=window.external.showBrowserUI("PrivacySettings",null)>internet选项</a> <br>
  <a href="#" οnclick=history.go(1)>前进1</a><a href="#" οnclick=history.forward()>前进2</a><br>
  <a href="#" οnclick=history.go(-1)>后退1</a><a href="#" οnclick=history.back()>后退2</a><br>
  <a href="#" οnclick=setTimeout(window.close(),3000)>3秒关闭本窗口</a><br>
 
Top
 
 回复人: xiaobaowu(很想和你吹吹风(抵制日货)) ( ) 信誉:99  2003-11-19 10:56:19Z  得分:2 
 
 
?
关于<table>折行:
<table style="TABLE-LAYOUT: fixed" width="200" border="0" cellspacing="0" cellpadding="7" bgcolor="#f7f7f7">
<tr>
<td style="LEFT: 0px; WIDTH: 100%; WORD-WRAP: break-word">
dffadfdaqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqsfdffadfdasfdffadfdasfdffadfdasfdffadfdasfdffadfdasfdffadfdasfdffadfdasfdffadfdasfdffadfdasf
</font></td>
</tr>
</table>
重点是"WORD-WRAP: break-word"把它去掉再看看就知道了.
 
Top
 
 回复人: xiaobaowu(很想和你吹吹风(抵制日货)) ( ) 信誉:99  2003-11-19 10:58:20Z  得分:2 
 
 
?
关于asp安装程序的制作
转Jaron(唐伯虎点蚊香) 的:
浏览他在CSDN的专栏:
http://www.csdn.net/develop/MY_article.asp?author=Jaron
浏览他的论坛:
http://community.jiangdu.net/list.asp?boardid=13
 
Top
 
 回复人: liuping00(LP) ( ) 信誉:99  2003-11-19 16:02:59Z  得分:0 
 
 
?
感动!
好东西呀!
 
Top
 
 回复人: damboo(淡泊) ( ) 信誉:100  2003-11-19 16:25:59Z  得分:0 
 
 
?
关于对自制控件的数字签名
免得页面访问时总是提示“该控件不安全”
www.kaoshi.net/damboo/signcode.htm 

 
Top
 
 回复人: fxj0622(风) ( ) 信誉:100  2003-11-20 01:15:04Z  得分:0 
 
 
?
努力学习中谢谢各位  qq89128138   fxj0622@126.com
 
Top
 
 回复人: nofogw() ( ) 信誉:100  2003-11-20 10:38:55Z  得分:3 
 
 
?
批量录入在数据库的应用中比较广泛的,关于批量录入的方法也有好多种。
下面我就结合我实际中的应用,谈一下儿我是怎么实现的。
主要用到的是form的集合的概念,通过循环取的所有的集合内数据。
考虑到大家看着方便,我把它集成到了一个页面。
下面是具体的代码:
batchInput.asp
<%
'#####################################
'File Function:批量录入数据
'Author:Myhon
'Date:2003-8-19
'#####################################
'向数据库写入数据
SUB writeData()
    dim recCnt,i
    dim fieldName1,fieldName2,fieldName3
    dim conn
    dim sqlStr,connStr
    connStr="Provider=SQLOLEDB.1;Initial Catalog=myDatabase;Data Source=myhon;User Id=sa;PASSWORD="
    set conn=Server.CreateObject("ADODB.Connection")
    conn.open connStr  '建立数据库连接
    recCnt=request.form("stu_num").count   '取得共有多少条记录
    '批量录入数据
    for i=1 to recCnt
        fieldName1=trim(request.form("fieldName1")(i))
        fieldName2=trim(request.form("fieldName2")(i))
        fieldName3=trim(request.form("fieldName3")(i))
        sqlStr="insert into myTable(fieldName1,fieldName2,fieldName3) values('"
        sqlStr=sqlStr & fieldName1 & "','"
        sqlStr=sqlStr & fieldName2 & "','"
        sqlStr=sqlStr & fieldName3 & "')"
        'response.write sqlStr
        conn.execute(sqlStr)
    next
END SUB
'显示成批录入的界面
SUB InputData()
dim recCnt,i
%>
<form name="bathInputData" action="" method="post">
<%
recCnt=cint(request.form("recCnt"))
for i=1 to recCnt
%>
<input type="text" name="fieldName1">
<input type="text" name="fieldName2">
<input type="text" name="fieldName3">
<%
next
%>
<br>
<input type="submit" name="action" value="提交">
</form>
<%
END SUB
'指定要批量录入多少条记录
SUB assignHowMuch()
%>
<!------指定要录入多少条记录-------------->
<form name="form1" action="" method="post">
您要录入的记录的条数:<input type="text" name="recCnt">
<input type="submit" name="action" value="下一步>>">
</form>
<%
END SUB
if request.form("action")="下一步>>" then
   Call InputData()  '显示成批录入界面
elseif request.form("action")="提交" then Call writeData()  '向数据库批量写入数据
else
   Call assignHowMuch()  '显示指定录入多少条记录的界面
end if
  
%>

 
Top
 
 回复人: nofogw() ( ) 信誉:100  2003-11-20 10:40:30Z  得分:2 
 
 
?
以动感下载系统为例:
打开文件 SoftDown.Asp 在:
 if request.QueryString("ID")="" then
  response.write "不能连接或者没有指定下载软件"
  response.end
 end if
的上面或者是下面加上下列代码
 dim strReferer,domain,splDomain,isHttp
isHttp=false
'本站下载系统网址列表,不要带上http://
domain="sron.net,61.156.14.223,61.156.14.227"
splDomain=split(domain,",")
strReferer=Request.ServerVariables("HTTP_REFERER")
for iii = 0 to ubound(splDomain)
if instr(strReferer,trim(splDomain(iii)))>0 then isHttp=True
next
if isnull(strReferer) or isHttp=false then
Response.Write "下载链接来自其他网站,这是不允许的,<a href=""./"">请进入本站页面后再进行下载。</a>"
CloseDatabase
response.end
end if
本站下载系统网址列表 就是访问你下载频道网址里的域名,比如你的下载频道可以用多个网址来访问,所以这里用逗号隔开.
 
Top
 
 回复人: monkeyhjl(爬上墙头等红杏) ( ) 信誉:97  2003-11-20 10:50:53Z  得分:0 
 
 
?
GOOD!
 
Top
 
 回复人: liyunjiang(有种打死我) ( ) 信誉:99  2003-11-20 15:01:38Z  得分:0 
 
 
?
签收~
 
Top
 
 回复人: yjgx007(谁是高手) ( ) 信誉:83  2003-11-20 15:52:53Z  得分:2 
 
 
?
无法写入cookie的常见问题
1.确定你的response.cookie代码在第一个<html>之前
2.设置cookies的截止日期response.cookie("cookiename").expires = expiresdate;
设置cookie的请求指定路径:
就是说你的cookie写入后,指定路径中的页面才有权得到这个cookie
例如:指定路径response.cookie("cookiename").path = "http://www.domain.com/path"
那么只有path目录中的页面才能得到request.cookie("cookiename")
 
Top
 
 回复人: windancer(^_^) ( ) 信誉:110  2003-11-20 19:16:01Z  得分:0 
 
 
?
vbscript的错误捕捉:
on error resume next        '打开错误捕捉
...
if err.number<>0 then       'err是vbs内置的对象,类似于try catch的exception
   err.clear                '错误被处理了就要及时把错误标记清空
   '输出自己的出错信息,或用err.description显示系统出错信息
end if
on error goto 0     '关闭错误捕捉。
 
Top
 
 回复人: Jaron(唐伯虎点蚊香) ( ) 信誉:317  2003-11-20 22:30:36Z  得分:3 
 
 
?
这里还有很多。以前偶征集的。
http://expert.csdn.net/Expert/TopicView1.asp?id=2128813
 
Top
 
 回复人: Blackstarhh(黑星) ( ) 信誉:98  2003-11-20 23:22:53Z  得分:2 
 
 
?
比如:
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="28"> <div align="left"><font color="#FF0000">您的位置:<a href="/index.asp" class=("index.asp")>首页</a>-&gt;公告</font></div>
      <div align="right"></div>
      <div align="center"></div></td>
    <td width="52%">
<!--#include file="../log.asp"-->
在这以下的语句就不认得了。
 </td>
  </tr>
</table>
在浏览器中能看到包含文件的内容,但是在dreamweaver中却看不到这以下的内容了。不能编辑,请求帮忙。

 
Top
 
 回复人: jervis82(我是海绵.吸.吸.吸...) ( ) 信誉:100  2003-11-20 23:32:30Z  得分:0 
 
 
?
我用的是动网0519版收集,有空间的话我可以上传上去
 
Top
 
 回复人: fxj0622(风) ( ) 信誉:100  2003-11-21 14:25:26Z  得分:0 
 
 
?
呵呵  全市好东西啊  谢谢
 
Top
 
 回复人: jdler(闲人) ( ) 信誉:98  2003-11-21 17:01:17Z  得分:0 
 
 
?
请教:
   如何能实现页中页效果???
 
Top
 
 回复人: yjgx007(谁是高手) ( ) 信誉:83  2003-11-21 18:38:10Z  得分:0 
 
 
?
当前页面的html代码中加入
<ifrmae src="http://yourpageaddr"></iframe>
src属性就是页面中引用另一个页面的地址,不过Netscape浏览器好像不支持
 
Top
 
 回复人: SuperBJack(我想飞翔) ( ) 信誉:99  2003-11-21 19:07:28Z  得分:0 
 
 
?
对错误的代码修改正之后,有能及时刷新,注销也不成,要重启.
 
Top
 
 回复人: rena2003tj(赵赵) ( ) 信誉:99  2003-11-22 16:36:16Z  得分:2 
 
 
?
ServerVariables集合用于得到系统的环境变量用以下程序可以讲ServerVariables集合的所有内容名称都显示出来
<html>
<head></head>
<body>
<% for each item in request.servervariables
   response.write("<p><b>"&item&"</b>:")
   response.write(request.serverVariables(item))
   next
%>
</body>
</html>
具体的系统环境变量如下:
Auth_Type  当用户访问一个被保护的脚本时,用于判断是否是一个有效用户
Content_Length  客户端所提交的正文的长度
Content_Type  提交的正文数据类型
Gateway_Interface  服务器所使用的CGI修订版本
Login_User  用户是否以Windows NT帐户登陆
Path_Info  客户端路径信息
Query_String   在一个HTTP请求的查询信息
Remote_Addr  发送请求的远程主机的ip地址,利用此地址可以知道访问这的来源
Remote_Host  发送请求的远程主机名,如果远端服务器不包含该信息,则返回空字符串
Request_Method  数据请求的方法
Script_Map  url的基本部分
Script_Name  执行脚本的虚拟路径
Server_Name  该服务器的名称DNS的别名,IP地址及其制定的url路径
Server_Port  数据请求所使用的端口号
Server_Software 服务器端运行的软件名称及版本号
Server_Protocol  要求信息的协议及修订版本
URL  系统的URL路径
HTTP_REFERER  当通过链接到大当前页面时,HTTP_REFERER header  保存这个用户的来源
 
Top
 
 回复人: jdler(闲人) ( ) 信誉:98  2003-11-23 17:11:37Z  得分:0 
 
 
?
请教:如何判断某个用户是否在线?主要用于防止一个用户名多人同时登录,并且要求前一个用户离开网站或者直接关机以后其他用户可以马上用这个帐号立即登录。
 
Top
 
 回复人: 13617650029(酒瓶子) ( ) 信誉:98  2003-11-23 17:24:47Z  得分:0 
 
 
?
强烈推荐xxrl(孔曰成仁,孟曰取E)的http://www.tjhgc.com/xxrl.zip这个东西,东东多多啊

下不了了
谁刚才下了  麻烦共享一下
我的QQ
974424
我的EMAIL
WGJ521.@163.COM
谢谢
 
Top
 
 回复人: jdler(闲人) ( ) 信誉:98  2003-11-23 17:43:58Z  得分:0 
 
 
?
再提一个问题,如何模拟按下IE上的关闭钮!(注:我只想触发关闭事件,而不是想直接关闭窗口。)
 
Top
 
 回复人: clkun(我来是学习) ( ) 信誉:67  2003-11-24 12:07:00Z  得分:3 
 
 
?
推荐收藏:
http://khan.y365.com/asp/data/%B8%BD%C2%BC.htm
 
Top
 
 回复人: xiaoxingchi(第007元素) ( ) 信誉:100  2003-11-24 15:11:57Z  得分:3 
 
 
?
我把上面的资料全部收集在我的个人主页上了,有兴趣的可以过去看一下!
http://www.hn03.com/315500/
或者
http://www.315500.org '注:此域名暂时可能不能访问,两天后就可以访问了!
 
Top
 
 回复人: mind(【夜猫】) ( ) 信誉:100  2003-11-25 11:48:08Z  得分:0 
 
 
?
 
Top
 
 回复人: wyljz(龙玉) ( ) 信誉:100  2003-11-25 13:20:32Z  得分:0 
 
 
?
真是受益非浅呀,害得我午觉都没睡,太值得了
 
Top
 
 回复人: vivisogood(新人类~~~~(Fuck 小日本~~)) ( ) 信誉:100  2003-11-25 15:11:33Z  得分:0 
 
 
?
HTML文件标记
<html>
<head>
<!-->
<title>
<body>
文字排版标记
<br>
<nobr>
<p>
<pre>            原始文字样式
<center>
<blockquote>     向内缩排
<h>              标题
<strong>,<b>     粗体
<em>,<i>,<cite>  斜体
<U>              底线
<strike>         删除线
<blink>          文字闪烁
<big>            大型字体
<small>          小型字体
<sup>            文字上标
<SUB>            文字下标
<basefont>       默认字体设置
<font>           更改字体设置
菜单标记
<menu>           选项菜单
<dir>            目录菜单
<lh>             菜单格式(一)
<ul>             菜单格式(二)
<dl>,<dt>,<dd>   说明式菜单
<ol>,<li>        标题菜单
直线与表格标记
<hr>
<table>
<tr>
<td>
<th>
<caption>       表格标题
超链接标记
<a>             锚
图形标记
<IMG>          插入图形
框架标记
<FRAME>        定义框架内容
<NOFRAME>      不支持框架声明
表单标记
<FORM>
<INPUT>
<TEXTAREA>
<SELECT>
<OPTION>
SCRIPT
<script>
VBSCRIPT标记索引
基本运算
+              数字加法及字符串连接
-              数字减法
*              数字乘法
/              数字除法
Mod            求余数
/              求商数
&              字符串连接
^              次方
=              相等
<>             不相等
>=             大于或等于
>              大于
<=             小于或等于
<              小于
Not            非
And            且
Or             或
Xor            异或
循环及决策
if ....then                 若...则...
if ...then...else           若...则...非
else if...                  非若
select case...              群组选择条件
end select
for ... next                计数循环
while...wend                条件循环(一)
do while...loop             条件循环(二)
do...loop while             条件循环(三)
do until...loop             条件循环(四)
do...loop until             条件循环(五)
数学函数
Abs             绝对值
Sgn             正负号
Hex             转换成十六进制
Oct             转换成八进制
Sqr             平方根
Int             取整数
Fix             取整数
Round           取整数
Log             以e为底的对数
Sin             正弦函数
Cos             余弦函数
Tan             正切函数
字符串处理函数
Len             字符串长度
Mid             取部分字符串
Left            从字符串开头取部分字符串
Right           从字符串结尾取部分字符串
Lcase           转换成小写
Ucase           转换成大写
Trim            清除字符串开头及结尾的空格符
Ltrim           清除字符串开头空格符
Rtrim           清除字符串结尾空格符
Replace         替换字符串部分字符
Instr           判断是否包含于另一个字符串(从起始搜寻)
InstrRev        判断是否包含于另一个字符串(从结尾搜寻)
Space           任意字符数的空格符
String          任意字符数的任一字符
StrReverse      反转字符串
Split           以某字符分割字符串
数据类型转换函数
Cint            转换成整形
Cstr            转换成字符串 
Clng            转换成常整数
Cbool           转换成布尔函数
Cdate           转换成日期函数
CSng            转换成单精度
CDbl            转换成双精度
日期时间函数
Date            现在日期
Time            现在时间
NOw             现在日期时间
DateAdd         增加日期
DateDiff        两日期差
DateSerial      日期设定
DateValue       日期设定
Year            现在年份
Month           现在月份
Day             现在天
Hour            现在时刻
Minute          现在分钟
Second          现在秒钟
Timer           午夜距现在秒数
TimeSerial      时间设定
TimeValue       时间所属部分
WeekDay         星期名称
MonthName       月份名称
其它函数
Array           产生数组
Asc             字符ASCII码
Chr             ASCII码字符
Filter          过滤数组
InputBox        输入窗口
Join            合并数组中的元素
MsgBox          信息窗口
Lbound          数组下界
Ubound          数组上界
指令     
Const           设定常数         
Dim             定义变量或者数组
Erase           清除数组
ReDim           重新声明数组
Randomize       起始随机数
Rnd             取得随机数
ASP对象
Session对象
IsEmpty         测试Session变量是否存在
TimeOut         设定Session变量生存周期
Abandon         强制清除Session变量
Application对象
IsEmpty         测试Application变量是否存在
Lock            锁定Application变量
Unlock          解除Lock指令的锁定
Cookies对象
Expires         设定Cookies变量的生存周期
Connection对象
Open            打开与数据库的连接
Execute         打开Recordset对象
Close           关闭Connection对象
Recordset对象
movefirst        将记录指针移至第一条
movelast         将记录指针移至最后一条
movenext         将记录指针移至下一条
moveprevious     将记录指针移至上一条
bof              测试是否为recordset的起始
eof              测试是否为recordset的结束
open             打开Recoreset对象
close            关闭recordset对象
fields           读取数据的子对象
fileds.count     字段个数
pagesize         每页记录条数
absolutepage     设定为某页
pagecount        总页数
Absoluteposition 直接跳至某条记录
 

 
Top
 
 回复人: smiledragon2002(笑龙) ( ) 信誉:99  2003-11-26 00:20:59Z  得分:3 
 
 
?
没什么好共享的,但太感动了,把做树型菜单的js函数贴出来,
<SCRIPT language="JavaScript">
var lastObj
function expandIt(obj)
{
 if(lastObj != null)
 {
  if(obj == lastObj)
  {
   if(obj.style.display == "none")
   {
    obj.style.display = "";
   }
   else
   {
    obj.style.display = "none"
   }
  }
  else
  {
   lastObj.style.display = "none";
   obj.style.display = "";
  }
 }
 else
 {
  obj.style.display = "";
 }
 
 lastObj = obj
}
</SCRIPT>
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
  <%
  dim id
  id = request("id")
  dim strsql,rs
 
  strsql="select * from p_type where slanguage=1 and typelevel=1 order by typename"
  set rs=fgetrslist(strsql)
  do while not rs.eof
 
  %>
       <tr>
         <td height="25" class="LEFTLINKS"><img width="30" height="0" align="absmiddle" /><b><%if rs("isleaf")=0 then%><a href="#" onClick="javascript:expandIt(kb<%=rs("id")%>);return false"><%else%><a href="<%=request.ServerVariables("SCRIPT_NAME")%>?idtree=<%=rs("idtree")%>" ><%end if%><%=server.HTMLEncode(right((rs("typename")&""),len(rs("typename")&"")-2))%></a></b></td>
         </tr>
   <%
   IF clng(id)=clng(rs("id")) then
  
   %>
   <tr id="kb<%=rs("id")%>">
   <%
   else
  
   %>
  
  
   <tr id="kb<%=rs("id")%>"  style="display:none;">
   <%
   end if
   %>
  <td>
  <table>
   <%
   dim rs1
   strsql="select * from p_type where parentid="&rs("id")&" and slanguage=1 order by typename"
   set rs1=fgetrslist(strsql)
   do while not rs1.eof
   %>
   <tr><td  height="20" class="LEFTLINKS">
   <img width="40" height="0" align="absmiddle" /><a href="<%=request.ServerVariables("SCRIPT_NAME")%>?idtree=<%=rs1("idtree")%>&id=<%=rs("id")%>" ><%=server.HTMLEncode(right((rs1("typename")&""),len(rs1("typename")&"")-2))%></a></td></tr>
   <%
   rs1.movenext
   loop
   rs1.close
   set rs1=nothing
   %>
  </table>
   </td>
   </tr>
   <%
   rs.movenext
  
   loop
   rs.close
   set rs=nothing
   %>
       </table>

 
Top
 
 回复人: spidertan(阿谭) ( ) 信誉:100  2003-11-26 03:54:01Z  得分:0 
 
 
?
问大家一个问题,怎样实现“文件”菜单下的“发送==〉电子邮件页面...”命令?
 
Top
 
 回复人: liyun819(李云) ( ) 信誉:100  2003-11-26 13:54:29Z  得分:0 
 
 
?
贴子不错值得收藏

 
Top
 
 回复人: liyun819(李云) ( ) 信誉:100  2003-11-26 14:07:11Z  得分:0 
 
 
?
我自己制作一个Activex控件,利用CODEBASE可以自动下载,但是如果不降低网络的安全,就不能自动下载注册。
如果向有关机构注册这个控件,有关机构是什么,有谁知道????
如果使用MS提供的测试根证书(ROOT CERT),该如何操作,谁会????
 
Top
 
 回复人: vivisogood(新人类~~~~(Fuck 小日本~~)) ( ) 信誉:100  2003-11-26 14:51:01Z  得分:0 
 
 
?
我这里还有很多自己收藏的函数和一些问题解决方法. 好几次想全部发商去.但是不能连续发三个啊. 算了不发了!
 
Top
 
 回复人: spidertan(阿谭) ( ) 信誉:100  2003-11-26 18:51:19Z  得分:0 
 
 
?
TO  vivisogood(新人类(传奇人生))
这不是调人胃口吗,发上来吧

 
Top
 
 回复人: ITmuse(天海) ( ) 信誉:99  2003-11-26 20:23:24Z  得分:3 
 
 
?
计算网页文本的汉字字数,去掉了表格以外的所有标识。
Function GetLength(strChinese1)
 Dim strWord, ascWord, lenTotal
 strChinese1 = Trim(strChinese1)
 If strChinese1 = "" Or Vartype(strChinese1) = vbNull Then
  GetLength = 0
  Exit Function
 End If
 lenTotal = 0 
 For GetLengthi=1 to Len(strChinese1)
  strWord = Mid(strChinese1, GetLengthi, 1)
  ascWord = Asc(strWord)
  If ascWord < 0 or ascWord > 127 then
   lenTotal = lenTotal + 1
  Elseif ascWord = 63 And strWord <> "?" then
   lenTotal = lenTotal + 1
  Elseif ascWord = 44 And strWord <> "," then
   lenTotal = lenTotal + 1
  Elseif ascWord = 33 And strWord <> "!" then
   lenTotal = lenTotal + 1
  Else
   lenTotal = lenTotal
  End If
 Next
 GetLength = lenTotal
End Function
 
Top
 
 回复人: chjpeng(棲鵬) ( ) 信誉:100  2003-11-27 08:30:36Z  得分:0 
 
 
?
好!
 
Top
 
 回复人: ryuginka(ryuginka) ( ) 信誉:94  2003-11-27 11:18:24Z  得分:0 
 
 
?
太喜欢了。
 
Top
 
 回复人: zhanghao5188(linux) ( ) 信誉:100  2003-11-27 14:08:44Z  得分:2 
 
 
?
<table width="95%" cellspacing="1" cellpadding="5" align=center bgcolor=999999>
<tr bgcolor=#ffcc00><td colspan="2"  height=25><b>服务器有关的变量</b></td></tr>
<tr bgcolor=#efefef><td valign=top>显示客户发出的所有HTTP标题</td><td><%=request.ServerVariables("All_Http")%></td></tr>
<tr bgcolor=#efefef><td valign=top>检取ISAPIDLL的metabase路径</td><td><%=request.ServerVariables("APPL_MD_PATH")%></td></tr>
<tr bgcolor=#efefef><td valign=top>显示站点物理路径</td><td><%=request.ServerVariables("APPL_PHYSICAL_PATH")%></td></tr>
<tr bgcolor=#efefef><td valign=top>路径信息</td><td><%=request.ServerVariables("PATH_INFO")%></td></tr>
<tr bgcolor=#efefef><td valign=top>显示请求机器IP地址</td><td><%=request.ServerVariables("REMOTE_ADDR")%></td></tr>
<tr bgcolor=#efefef><td valign=top>服务器IP地址</td><td><%=Request.ServerVariables("LOCAL_ADDR")%></td></tr>
<tr bgcolor=#efefef><td valign=top>显示执行SCRIPT的虚拟路径</td><td><%=request.ServerVariables("SCRIPT_NAME")%></td></tr>
<tr bgcolor=#efefef><td valign=top>返回服务器的主机名,DNS别名,或IP地址</td><td><%=request.ServerVariables("SERVER_NAME")%></td></tr>
<tr bgcolor=#efefef><td valign=top>返回服务器处理请求的端口</td><td><%=request.ServerVariables("SERVER_PORT")%></td></tr>
<tr bgcolor=#efefef><td valign=top>协议的名称和版本</td><td><%=request.ServerVariables("SERVER_PROTOCOL")%></td></tr>
<tr bgcolor=#efefef><td valign=top>服务器的名称和版本</td><td><%=request.ServerVariables("SERVER_SOFTWARE")%></td></tr>
<tr bgcolor=#efefef><td valign=top>服务器操作系统</td><td><%=Request.ServerVariables("OS")%></td></tr>
<tr bgcolor=#efefef><td valign=top>脚本超时时间</td><td><%=Server.ScriptTimeout%> 秒</td></tr>
<tr bgcolor=#efefef><td valign=top>服务器CPU数量</td><td><%=Request.ServerVariables("NUMBER_OF_PROCESSORS")%> 个</td></tr>
<tr bgcolor=#efefef><td valign=top width=30%>服务器解译引擎</td><td><%=ScriptEngine & "/"& ScriptEngineMajorVersion &"."&ScriptEngineMinorVersion&"."& ScriptEngineBuildVersion %></td></tr>
</table>
 
Top
 
 回复人: fbchenyong(人在风雨中) ( ) 信誉:74  2003-11-28 09:56:03Z  得分:0 
 
 
?
真是不错啊,收益匪浅,谢谢各位。全部收藏。
 
Top
 
 回复人: xelibri(刘洋) ( ) 信誉:100  2003-11-29 11:17:13Z  得分:2 
 
 
?
昨天有人问MicrosoftVBscript运行时错误的全部列表,我给他回了vbscript帮助里面的错误列表,回来自己用Err.Raise做了个编历的小程序,发现给人家发的不全,再想贴却发现有限制,连续不能发三贴以上。。郁闷
MicrosoftVBscript运行时错误(完整版)共121个
MicrosoftVBscript运行时错误(0x000A0005) 无效的过程调用或参数
MicrosoftVBscript运行时错误(0x000A0005) 无效的过程调用或参数
MicrosoftVBscript运行时错误(0x000A0006) 溢出
MicrosoftVBscript运行时错误(0x000A0007) 内存不够
MicrosoftVBscript运行时错误(0x000A0009) 下标越界
MicrosoftVBscript运行时错误(0x000A000A) 该数组为定长的或临时被锁定
MicrosoftVBscript运行时错误(0x000A000B) 被零除
MicrosoftVBscript运行时错误(0x000A000D) 类型不匹配
MicrosoftVBscript运行时错误(0x000A000E) 字符串空间不够
MicrosoftVBscript运行时错误(0x000A0011) 不能执行所需的操作
MicrosoftVBscript运行时错误(0x000A001C) 堆栈溢出
MicrosoftVBscript运行时错误(0x000A0023) 未定义过程或函数
MicrosoftVBscript运行时错误(0x000A0030) 加载 DLL 时出错
MicrosoftVBscript运行时错误(0x000A0033) 内部错误
MicrosoftVBscript运行时错误(0x000A0034) 错误的文件名或号码
MicrosoftVBscript运行时错误(0x000A0035) 文件未找到
MicrosoftVBscript运行时错误(0x000A0036) 错误的文件模式
MicrosoftVBscript运行时错误(0x000A0037) 文件已经打开
MicrosoftVBscript运行时错误(0x000A0039) 设备 I/O 错误
MicrosoftVBscript运行时错误(0x000A003A) 文件已存在
MicrosoftVBscript运行时错误(0x000A003D) 磁盘已满
MicrosoftVBscript运行时错误(0x000A003E) 输入超出了文件尾
MicrosoftVBscript运行时错误(0x000A0043) 文件过多
MicrosoftVBscript运行时错误(0x000A0044) 设备不可用
MicrosoftVBscript运行时错误(0x000A0046) 没有权限
MicrosoftVBscript运行时错误(0x000A0047) 磁盘没有准备好
MicrosoftVBscript运行时错误(0x000A004A) 重命名时不能带有其他驱动器符号
MicrosoftVBscript运行时错误(0x000A004B) 路径/文件访问错误
MicrosoftVBscript运行时错误(0x000A004C) 路径未找到
MicrosoftVBscript运行时错误(0x000A005B) 对象变量未设置
MicrosoftVBscript运行时错误(0x000A005C) For 循环未初始化
MicrosoftVBscript运行时错误(0x000A005E) 无效使用 Null
MicrosoftVBscript运行时错误(0x000A0142) 不能创建必要的临时文件
MicrosoftVBscript运行时错误(0x000A01A8) 缺少对象
MicrosoftVBscript运行时错误(0x000A01AD) ActiveX 部件不能创建对象
MicrosoftVBscript运行时错误(0x000A01AE) 类不支持 Automation 操作
MicrosoftVBscript运行时错误(0x000A01B0) Automation 操作中文件名或类名未找到
MicrosoftVBscript运行时错误(0x000A01B6) 对象不支持此属性或方法
MicrosoftVBscript运行时错误(0x000A01B8) Automation 操作错误
MicrosoftVBscript运行时错误(0x000A01BD) 对象不支持此操作
MicrosoftVBscript运行时错误(0x000A01BE) 对象不支持已命名参数
MicrosoftVBscript运行时错误(0x000A01BF) 对象不支持当前区域设置选项
MicrosoftVBscript运行时错误(0x000A01C0) 未找到已命名参数
MicrosoftVBscript运行时错误(0x000A01C1) 参数是必选项
MicrosoftVBscript运行时错误(0x000A01C2) 错误的参数个数或无效的参数属性值
MicrosoftVBscript运行时错误(0x000A01C3) 对象不是一个集合
MicrosoftVBscript运行时错误(0x000A01C5) 未找到指定的 DLL 函数
MicrosoftVBscript运行时错误(0x000A01C7) 代码资源锁定错误
MicrosoftVBscript运行时错误(0x000A01C9) 此键已与该集合的一个元素关联
MicrosoftVBscript运行时错误(0x000A01CA) 变量使用了一个 VBScript 中不支持的 Automation 类型
MicrosoftVBscript运行时错误(0x000A01CE) 远程服务器不存在或不可用
MicrosoftVBscript运行时错误(0x000A01E1) 无效图片
MicrosoftVBscript运行时错误(0x000A01F4) 变量未定义
MicrosoftVBscript运行时错误(0x000A01F5) 非法赋值
MicrosoftVBscript运行时错误(0x000A01F6) 对象不能安全用 Script 编程
MicrosoftVBscript运行时错误(0x000A01F7) 对象不能安全初始化
MicrosoftVBscript运行时错误(0x000A01F8) 对象不能安全创建
MicrosoftVBscript运行时错误(0x000A01F9) 无效的或无资格的引用
MicrosoftVBscript运行时错误(0x000A01FA) 类没有被定义
MicrosoftVBscript运行时错误(0x000A01FB) 出现一个意外错误
MicrosoftVBscript运行时错误(0x000A03E9) 内存不够
MicrosoftVBscript运行时错误(0x000A03EA) 语法错误
MicrosoftVBscript运行时错误(0x000A03EB) 缺少 ':'
MicrosoftVBscript运行时错误(0x000A03ED) 缺少 '('
MicrosoftVBscript运行时错误(0x000A03EE) 缺少 ')'
MicrosoftVBscript运行时错误(0x000A03EF) 缺少 ']'
MicrosoftVBscript运行时错误(0x000A03F2) 缺少标识符
MicrosoftVBscript运行时错误(0x000A03F3) 缺少 '='
MicrosoftVBscript运行时错误(0x000A03F4) 缺少 'If'
MicrosoftVBscript运行时错误(0x000A03F5) 缺少 'To'
MicrosoftVBscript运行时错误(0x000A03F6) 缺少 'End'
MicrosoftVBscript运行时错误(0x000A03F7) 缺少 'Function'
MicrosoftVBscript运行时错误(0x000A03F8) 缺少 'Sub'
MicrosoftVBscript运行时错误(0x000A03F9) 缺少 'Then'
MicrosoftVBscript运行时错误(0x000A03FA) 缺少 'Wend'
MicrosoftVBscript运行时错误(0x000A03FB) 缺少 'Loop'
MicrosoftVBscript运行时错误(0x000A03FC) 缺少 'Next'
MicrosoftVBscript运行时错误(0x000A03FD) 缺少 'Case'
MicrosoftVBscript运行时错误(0x000A03FE) 缺少 'Select'
MicrosoftVBscript运行时错误(0x000A03FF) 缺少表达式
MicrosoftVBscript运行时错误(0x000A0400) 缺少语句
MicrosoftVBscript运行时错误(0x000A0401) 语句未结束
MicrosoftVBscript运行时错误(0x000A0402) 缺少整型常数
MicrosoftVBscript运行时错误(0x000A0403) 缺少 'While' 或 'Until'
MicrosoftVBscript运行时错误(0x000A0404) 缺少 'While' 和 'Until'或语句未结束
MicrosoftVBscript运行时错误(0x000A0405) 缺少 'With'
MicrosoftVBscript运行时错误(0x000A0406) 标识符过长
MicrosoftVBscript运行时错误(0x000A0407) 无效数字
MicrosoftVBscript运行时错误(0x000A0408) 无效字符
MicrosoftVBscript运行时错误(0x000A0409) 未结束的字符串常量
MicrosoftVBscript运行时错误(0x000A040A) 注释未结束
MicrosoftVBscript运行时错误(0x000A040D) 无效使用 'Me' 关键字
MicrosoftVBscript运行时错误(0x000A040E) 'loop' 语句缺少 'do'
MicrosoftVBscript运行时错误(0x000A040F) 无效的 'exit' 语句
MicrosoftVBscript运行时错误(0x000A0410) 循环控制变量 'for' 无效
MicrosoftVBscript运行时错误(0x000A0411) 名称重定义
MicrosoftVBscript运行时错误(0x000A0412) 必须是行中的第一个语句
MicrosoftVBscript运行时错误(0x000A0413) 不能为 non-ByVal 参数赋值
MicrosoftVBscript运行时错误(0x000A0414) 调用子程序时不能使用括号
MicrosoftVBscript运行时错误(0x000A0415) 缺少文字常数
MicrosoftVBscript运行时错误(0x000A0416) 缺少 'In'
MicrosoftVBscript运行时错误(0x000A0417) 缺少 'Class'
MicrosoftVBscript运行时错误(0x000A0418) 必须在一个类的内部定义
MicrosoftVBscript运行时错误(0x000A0419) 在属性声明中缺少 Let , Set 或 Get
MicrosoftVBscript运行时错误(0x000A041A) 缺少 'Property'
MicrosoftVBscript运行时错误(0x000A041B) 在所有属性的规范中,变量的数目必须一致
MicrosoftVBscript运行时错误(0x000A041C) 在一个类中不允许有多个缺省的属性/方法
MicrosoftVBscript运行时错误(0x000A041D) 类的初始化或终止程序没有变量
MicrosoftVBscript运行时错误(0x000A041E) 属性的 set 或 let 必须至少有一个变量
MicrosoftVBscript运行时错误(0x000A041F) 错误的 'Next'
MicrosoftVBscript运行时错误(0x000A0420) 'Default' 只能在 'Property' , 'Function' 或 'Sub' 中指定
MicrosoftVBscript运行时错误(0x000A0421) 指定 'Default' 时必须同时指定 'Public'
MicrosoftVBscript运行时错误(0x000A0422) 只能在 Property Get 中指定 'Default'
MicrosoftVBscript运行时错误(0x000A1000) Microsoft VBScript 编译器错误
MicrosoftVBscript运行时错误(0x000A1001) Microsoft VBScript 运行时错误
MicrosoftVBscript运行时错误(0x000A1398) 缺少正则表达式对象
MicrosoftVBscript运行时错误(0x000A1399) 正则表达式语法错误
MicrosoftVBscript运行时错误(0x000A139A) 错误的数量词
MicrosoftVBscript运行时错误(0x000A139B) 正则表达式中缺少 ']'
MicrosoftVBscript运行时错误(0x000A139C) 正则表达式中缺少 ')'
MicrosoftVBscript运行时错误(0x000A139D) 字符集越界
 
Top
 
 回复人: peon(加菲-加菲 一只特立独行的猫) ( ) 信誉:100  2003-11-29 11:20:31Z  得分:0 
 
 
?
太美妙啦!
 
Top
 
 回复人: xelibri(刘洋) ( ) 信誉:100  2003-11-29 11:22:27Z  得分:2 
 
 
?
10进制表示,希望actor2222 (优悠) 能看到
MicrosoftVBscript运行时错误列表(10进制表示)
error # 5 无效的过程调用或参数
error # 5 无效的过程调用或参数
error # 6 溢出
error # 7 内存不够
error # 9 下标越界
error # 10 该数组为定长的或临时被锁定
error # 11 被零除
error # 13 类型不匹配
error # 14 字符串空间不够
error # 17 不能执行所需的操作
error # 28 堆栈溢出
error # 35 未定义过程或函数
error # 48 加载 DLL 时出错
error # 51 内部错误
error # 52 错误的文件名或号码
error # 53 文件未找到
error # 54 错误的文件模式
error # 55 文件已经打开
error # 57 设备 I/O 错误
error # 58 文件已存在
error # 61 磁盘已满
error # 62 输入超出了文件尾
error # 67 文件过多
error # 68 设备不可用
error # 70 没有权限
error # 71 磁盘没有准备好
error # 74 重命名时不能带有其他驱动器符号
error # 75 路径/文件访问错误
error # 76 路径未找到
error # 91 对象变量未设置
error # 92 For 循环未初始化
error # 94 无效使用 Null
error # 322 不能创建必要的临时文件
error # 424 缺少对象
error # 429 ActiveX 部件不能创建对象
error # 430 类不支持 Automation 操作
error # 432 Automation 操作中文件名或类名未找到
error # 438 对象不支持此属性或方法
error # 440 Automation 操作错误
error # 445 对象不支持此操作
error # 446 对象不支持已命名参数
error # 447 对象不支持当前区域设置选项
error # 448 未找到已命名参数
error # 449 参数是必选项
error # 450 错误的参数个数或无效的参数属性值
error # 451 对象不是一个集合
error # 453 未找到指定的 DLL 函数
error # 455 代码资源锁定错误
error # 457 此键已与该集合的一个元素关联
error # 458 变量使用了一个 VBScript 中不支持的 Automation 类型
error # 462 远程服务器不存在或不可用
error # 481 无效图片
error # 500 变量未定义
error # 501 非法赋值
error # 502 对象不能安全用 Script 编程
error # 503 对象不能安全初始化
error # 504 对象不能安全创建
error # 505 无效的或无资格的引用
error # 506 类没有被定义
error # 507 出现一个意外错误
error # 1001 内存不够
error # 1002 语法错误
error # 1003 缺少 ':'
error # 1005 缺少 '('
error # 1006 缺少 ')'
error # 1007 缺少 ']'
error # 1010 缺少标识符
error # 1011 缺少 '='
error # 1012 缺少 'If'
error # 1013 缺少 'To'
error # 1014 缺少 'End'
error # 1015 缺少 'Function'
error # 1016 缺少 'Sub'
error # 1017 缺少 'Then'
error # 1018 缺少 'Wend'
error # 1019 缺少 'Loop'
error # 1020 缺少 'Next'
error # 1021 缺少 'Case'
error # 1022 缺少 'Select'
error # 1023 缺少表达式
error # 1024 缺少语句
error # 1025 语句未结束
error # 1026 缺少整型常数
error # 1027 缺少 'While' 或 'Until'
error # 1028 缺少 'While' 和 'Until'或语句未结束
error # 1029 缺少 'With'
error # 1030 标识符过长
error # 1031 无效数字
error # 1032 无效字符
error # 1033 未结束的字符串常量
error # 1034 注释未结束
error # 1037 无效使用 'Me' 关键字
error # 1038 'loop' 语句缺少 'do'
error # 1039 无效的 'exit' 语句
error # 1040 循环控制变量 'for' 无效
error # 1041 名称重定义
error # 1042 必须是行中的第一个语句
error # 1043 不能为 non-ByVal 参数赋值
error # 1044 调用子程序时不能使用括号
error # 1045 缺少文字常数
error # 1046 缺少 'In'
error # 1047 缺少 'Class'
error # 1048 必须在一个类的内部定义
error # 1049 在属性声明中缺少 Let , Set 或 Get
error # 1050 缺少 'Property'
error # 1051 在所有属性的规范中,变量的数目必须一致
error # 1052 在一个类中不允许有多个缺省的属性/方法
error # 1053 类的初始化或终止程序没有变量
error # 1054 属性的 set 或 let 必须至少有一个变量
error # 1055 错误的 'Next'
error # 1056 'Default' 只能在 'Property' , 'Function' 或 'Sub' 中指定
error # 1057 指定 'Default' 时必须同时指定 'Public'
error # 1058 只能在 Property Get 中指定 'Default'
error # 4096 Microsoft VBScript 编译器错误
error # 4097 Microsoft VBScript 运行时错误
error # 5016 缺少正则表达式对象
error # 5017 正则表达式语法错误
error # 5018 错误的数量词
error # 5019 正则表达式中缺少 ']'
error # 5020 正则表达式中缺少 ')'
error # 5021 字符集越界
 
Top
 
 回复人: bright1234(小宝) ( ) 信誉:100  2003-12-01 09:35:14Z  得分:0 
 
 
?
太感动了,学习~!
 
Top
 
 回复人: xxrl(孔曰成仁,孟曰取E) ( ) 信誉:112  2003-12-02 15:59:50Z  得分:0 
 
 
?
声明一下,如果哪位想要我提供的xxrl.zip,请发短消息给我,提供邮件地址,因为空间是别人的,我已经删除了!
 
Top
 
 回复人: lovelimei(小乖) ( ) 信誉:97  2003-12-02 16:20:53Z  得分:0 
 
 
?
谢谢!小生感激不尽|!值得学习!精品……
 
Top
 
 回复人: dragon18(dragon) ( ) 信誉:86  2003-12-02 17:59:47Z  得分:0 
 
 
?
我想要,ddb18@tom.com
真的很不错!
 
Top
 
 回复人: emuonline() ( ) 信誉:100  2003-12-02 20:52:01Z  得分:0 
 
 
?
emuonline@21cn.com
谢谢xxrl(孔曰成仁,孟曰取E)
 
Top
 
 回复人: gu5(古伍) ( ) 信誉:100  2003-12-02 21:44:15Z  得分:0 
 
 
?
真的太好了,正想学习,也给我一份。
  cooboob@163.com       谢谢!!
 
Top
 
 回复人: WapWeb(大白菜芯) ( ) 信誉:75  2003-12-03 00:48:17Z  得分:0 
 
 
?
现在 时间是0:36分,昨天我们单位因为一个小同志迟到被开除了,BOSS说,谁下个迟到,谁去死.哈:可是我看到这些帖子后,深深的感动了,原来世界上还真有乐土啊.
我临时找了个空间,把上边的帖子简单的做了一个整理.我现在想好了,我以后就做CSDN帖子的整理工作了.到时候我把数据库给大家拿出来共享.地址是:
www.china-cu.net/bbs
小弟,快感动的哭了.
 
Top
 
 回复人: xxrl(孔曰成仁,孟曰取E) ( ) 信誉:112  2003-12-03 09:05:56Z  得分:0 
 
 
?
倒!
我看我还是再提供下载吧,我晕!
我倒!倒!倒!倒!
!!!!!
汗~~~~~
 
Top
 
 回复人: xxrl(孔曰成仁,孟曰取E) ( ) 信誉:112  2003-12-03 09:08:24Z  得分:0 
 
 
?
http://www.tjhgc.com/xxrl.zip
 
Top
 
 回复人: aocool(知秋一叶) ( ) 信誉:100  2003-12-03 09:22:07Z  得分:0 
 
 
?
还是兄弟们好!
强烈收藏!
 
Top
 
 回复人: WapWeb(大白菜芯) ( ) 信誉:75  2003-12-03 11:40:41Z  得分:0 
 
 
?
TO
 xxrl(孔曰成仁,孟曰取E)
我受到了。非常非常好啊。我最近会整理一下。谢谢,谢谢了。
 
Top
 
 回复人: longlover(健一) ( ) 信誉:98  2003-12-03 12:18:20Z  得分:0 
 
 
?
谢谢各位!!!!!!!!!!
    强烈推荐xxrl(孔曰成仁,孟曰取E)的http://www.tjhgc.com/xxrl.zip这个东西,东东多多啊!!!!!!!!!!!
    好!!!!!!!!!!!!!
    继续关注!!!!!!!!!!
    谁能帮我解决一个如何简单实现“统计在线人数”,最好具体点!!!!!!有代码!
    谢谢
 
Top
 
 回复人: xinyuewanqian(心境) ( ) 信誉:100  2003-12-03 17:50:35Z  得分:0 
 
 
?
好!!!!!
 
Top
 
 回复人: longlover(健一) ( ) 信誉:98  2003-12-03 18:06:04Z  得分:0 
 
 
?
一个局域网,框架网页,asp,sql2000,ie,请问如何实现当一个用户打开后,其他用户打开此页面时提示“有用户正在编辑,请稍后再打开。”直到第一个用户关闭该窗口, 最好讲得能具体点。
    谢谢!急急急...
 
Top
 
 回复人: vivisogood(新人类~~~~(Fuck 小日本~~)) ( ) 信誉:100  2003-12-04 14:44:02Z  得分:2 
 
 
?
利用ASP获得图象的实际尺寸的示例
<!--#include virtual="/learn/test/lib_graphicdetect.asp"-->
<html><head>
<TITLE>dbtable.asp</TITLE>
</head>
<body bgcolor="#FFFFFF">
<%
graphic="images/learnaspiconmain.gif"
HW = ReadImg(graphic)
Response.Write graphic & " Dimensions: " & HW(0) & "x" & HW(1)
& "<br>"
response.write "<img src=""/" & graphic & """"
response.write height=""" & HW(0) & """
response.write width=""" & HW(0) & "">"
%>
</body></html>
The library that is included is:
<%
Dim HW
Function AscAt(s, n)
AscAt = Asc(Mid(s, n, 1))
End Function
Function HexAt(s, n)
HexAt = Hex(AscAt(s, n))
End Function

Function isJPG(fichero)
If inStr(uCase(fichero), ".JPG") <> 0 Then
isJPG = true
Else
isJPG = false
End If
End Function

Function isPNG(fichero)
If inStr(uCase(fichero), ".PNG") <> 0 Then
isPNG = true
Else
isPNG = false
End If
End Function

Function isGIF(fichero)
If inStr(uCase(fichero), ".GIF") <> 0 Then
isGIF = true
Else
isGIF = false
End If
End Function

Function isBMP(fichero)
If inStr(uCase(fichero), ".BMP") <> 0 Then
isBMP = true
Else
isBMP = false
End If
End Function

Function isWMF(fichero)
If inStr(uCase(fichero), ".WMF") <> 0 Then
isWMF = true
Else
isWMF = false
End If
End Function

Function isWebImg(f)
If isGIF(f) Or isJPG(f) Or isPNG(f) Or isBMP(f) Or isWMF(f)
Then
isWebImg = true
Else
isWebImg = true
End If
End Function

Function ReadImg(fichero)
If isGIF(fichero) Then
ReadImg = ReadGIF(fichero)
Else
If isJPG(fichero) Then
ReadImg = ReadJPG(fichero)
Else
If isPNG(fichero) Then
ReadImg = ReadPNG(fichero)
Else
If isBMP(fichero) Then
ReadImg = ReadPNG(fichero)
Else
If isWMF(fichero) Then
ReadImg = ReadWMF(fichero)
Else
ReadImg = Array(0,0)
End If
End If
End If
End If
End If
End Function

Function ReadJPG(fichero)
Dim fso, ts, s, HW, nbytes
HW = Array("","")
Set fso = CreateObject("Scripting.FileSystemObject")
Set ts = fso.OpenTextFile(Server.MapPath("/" & fichero), 1)
s = Right(ts.Read(167), 4)
HW(0) = HexToDec(HexAt(s,3) & HexAt(s,4))
HW(1) = HexToDec(HexAt(s,1) & HexAt(s,2))
ts.Close
ReadJPG = HW
End Function

Function ReadPNG(fichero)
Dim fso, ts, s, HW, nbytes
HW = Array("","")
Set fso = CreateObject("Scripting.FileSystemObject")
Set ts = fso.OpenTextFile(Server.MapPath("/" & fichero), 1)
s = Right(ts.Read(24), 8)
HW(0) = HexToDec(HexAt(s,3) & HexAt(s,4))
HW(1) = HexToDec(HexAt(s,7) & HexAt(s,8))
ts.Close
ReadPNG = HW
End Function

Function ReadGIF(fichero)
Dim fso, ts, s, HW, nbytes
HW = Array("","")
Set fso = CreateObject("Scripting.FileSystemObject")
Set ts = fso.OpenTextFile(Server.MapPath("/" & fichero), 1)
s = Right(ts.Read(10), 4)
HW(0) = HexToDec(HexAt(s,2) & HexAt(s,1))
HW(1) = HexToDec(HexAt(s,4) & HexAt(s,3))
ts.Close
ReadGIF = HW
End Function

Function ReadWMF(fichero)
Dim fso, ts, s, HW, nbytes
HW = Array("","")
Set fso = CreateObject("Scripting.FileSystemObject")
Set ts = fso.OpenTextFile(Server.MapPath("/" & fichero), 1)
s = Right(ts.Read(14), 4)
HW(0) = HexToDec(HexAt(s,2) & HexAt(s,1))
HW(1) = HexToDec(HexAt(s,4) & HexAt(s,3))
ts.Close
ReadWMF = HW
End Function

Function ReadBMP(fichero)
Dim fso, ts, s, HW, nbytes
HW = Array("","")
Set fso = CreateObject("Scripting.FileSystemObject")
Set ts = fso.OpenTextFile(Server.MapPath("/" & fichero), 1)
s = Right(ts.Read(24), 8)
HW(0) = HexToDec(HexAt(s,4) & HexAt(s,3))
HW(1) = HexToDec(HexAt(s,8) & HexAt(s,7))
ts.Close
ReadBMP = HW
End Function

Function isDigit(c)
If inStr("0123456789", c) <> 0 Then
isDigit = true
Else
isDigit = false
End If
End Function

Function isHex(c)
If inStr("0123456789ABCDEFabcdef", c) <> 0 Then
isHex = true
Else
ishex = false
End If
End Function

Function HexToDec(cadhex)
Dim n, i, ch, decimal
decimal = 0
n = Len(cadhex)
For i=1 To n
ch = Mid(cadhex, i, 1)
If isHex(ch) Then
decimal = decimal * 16
If isDigit(c) Then
decimal = decimal + ch
Else
decimal = decimal + Asc(uCase(ch)) - Asc("A")
End If
Else
HexToDec = -1
End If
Next
HexToDec = decimal
End Function
%>
 

 
Top
 
 回复人: hgxlucky() ( ) 信誉:100  2003-12-05 11:32:15Z  得分:0 
 
 
?
简直是葵花宝典,收藏!!!
 
Top
 
 回复人: xiaoxo(iei) ( ) 信誉:95  2003-12-05 12:32:53Z  得分:0 
 
 
?
學習
 
Top
 
 回复人: yczhd(呵呵) ( ) 信誉:93  2003-12-06 16:56:10Z  得分:0 
 
 
?
xxrl(孔曰成仁,孟曰取E)
你的东西很精典了
太感谢了
 
Top
 
 回复人: yczhd(呵呵) ( ) 信誉:93  2003-12-06 17:25:57Z  得分:0 
 
 
?
空间不是问题呀
没空间的找我
我可以开空间
但速度不是很快只有2M光纤
 
Top
 
 回复人: Einar(zhili) ( ) 信誉:100  2003-12-07 22:22:04Z  得分:0 
 
 
?
精华
顶!

 
Top
 
 回复人: xxrl(孔曰成仁,孟曰取E) ( ) 信誉:112  2003-12-08 13:10:30Z  得分:0 
 
 
?
xxrl.zip已删除 不好意思.别人的空间,只能临时借用.
 
Top
 
 回复人: mygoldbaby(金贝贝) ( ) 信誉:被封杀  2003-12-08 16:21:04Z  得分:0 
 
 
?
ftp://qxlq.vicp.net:21001/
我常用的编程参考CHM书,哪位找个公共空间放放,我自己的机器不稳定
======================================
我有空间,先发过来吧。 netexperthero@163.com 请不要超过20MB。
 
Top
 
 回复人: helva() ( ) 信誉:99  2003-12-09 02:44:28Z  得分:0 
 
 
?
ok

 
Top
 
 回复人: helva() ( ) 信誉:99  2003-12-09 02:45:16Z  得分:0 
 
 
?
ftp://211.92.194.130/
免费空间
 
Top
 
 回复人: fujiachun(傅加淳) ( ) 信誉:105  2003-12-10 08:36:28Z  得分:2 
 
 
?
常用的javascript function
//=========================================
// 输入数据检验
// 检验空值
function funCheckEmpty(m_Text) {
 var strTmp=m_Text
 if (strTmp == null || strTmp == "") {
  return false
 }
 return true
}
//检验内容的长度
function funTextLenCheck(m_Text) {
 var strText=m_Text
 for(i=0;i<=strText.length-1;i++){
  if (strText.charCodeAt(i)>=256){
   return strText.length * 2
  }
 }
 return strText.length
}

//检验长度
function funCheckLen(m_Len,m_Text) {
 if (funTextLenCheck(m_Text)> m_Len) {
  return false
 }
 return true
}
//检验是否为数字
function funCheckNumber(m_Text) {
 var strTmp=m_Text
 if (isNaN(strTmp)) {
  return false
 }
 return true
}

//检验日期是否合法
function funcheckDate(m_Year,m_Month,m_Day){
 //根据月先取得最大日期
 var maxDay
 if (m_Month==2) {
  maxDay=28
  if (m_Year % 4 ==0) {
   maxDay=29 
  }
 } else {
  if (m_Month<=7){
   if (m_Month % 2 ==0){
    maxDay=30
   }else{
    maxDay=31
   }
  }else{
   if (m_Month % 2 ==0){
    maxDay=31
   }else{
    maxDay=30
   }
  }
 }
 if (m_Day>maxDay){
  return false
 }
 return true
}
//读取Cookies信息
function GetCookie(strCookName){
 var arvCookies=document.cookie.split("; ")
 for(var i=0;i< arvCookies.length; i++) {
  var arvOneCookie=arvCookies[i].split("=")
  if (strCookName==arvOneCookie[0]){
   return unescape(arvOneCookie[1])
  }
 }
 return ""
}
//替换字符串中的非法字符
function Replace_Text(text){
 var strTmp=text
 strTmp=strTmp.replace("@", "@")
 strTmp=strTmp.replace("?", "?")
 strTmp=strTmp.replace("&", "&")
 strTmp=strTmp.replace("'", "‘")
 strTmp=strTmp.replace("<", "〈")
 strTmp=strTmp.replace(">", "〉")
 return strTmp
}

function Check_PassWord(text){
 var strTmp=text
 if (strTmp.indexOf("'")>-1){
  return "'"
 }
 if (strTmp.indexOf("?")>-1){
  return "?"
 }
 if (strTmp.indexOf("&")>-1){
  return "&"
 }
 if (strTmp.indexOf("<")>-1){
  return "<"
 }
 if (strTmp.indexOf(">")>-1){
  return ">"
 }
 return ""
}

function Check_Url(text){
 var strTmp=text
 if (strTmp.indexOf("'")>-1){
  return false
 }
 return true
}
//焦点控制
function document.onkeydown(){
 var e = event.srcElement;
 if (event.keyCode == 13 && e.tagName == "INPUT" && e.type == "text"){
  event.keyCode = 9;
 }
}
 
Top
 
 回复人: sandyxxx(某年某月某日) ( ) 信誉:97  2003-12-10 08:41:04Z  得分:0 
 
 
?
怎样实现图片的横排循环显示???????????
 
Top
 
 回复人: spacener(空中楼阁) ( ) 信誉:99  2003-12-10 11:01:53Z  得分:0 
 
 
?
收藏
 
Top
 
 回复人: happyamang(看到代码就晕) ( ) 信誉:100  2003-12-11 13:42:21Z  得分:2 
 
 
?
<% response.write "
1.οncοntextmenu="window.event.returnvalue=false"将彻底屏蔽鼠标右键
<tableborderοncοntextmenu=return(false)><td>no</table>可用于table
2.<bodyonselectstart="returnfalse">取消选取、防止复制
3.οnpaste="returnfalse"不准粘贴
4.οncοpy="returnfalse;"oncut="returnfalse;"防止复制
5.<linkrel="shortcuticon"href="favicon.ico">ie地址栏前换成自己的图标
6.<linkrel="bookmark"href="favicon.ico">可以在收藏夹中显示出你的图标
7.<inputstyle="ime-mode:disabled">关闭输入法
8.永远都会带着框架
<scriptlanguage="javascript"><!--
if(window==top)top.location.href="frames.htm";//frames.htm为框架网页
//--></script>
9.防止被人frame
<scriptlanguage=javascript><!--
if(top.location!=self.location)top.location=self.location;
//--></script>
10.<noscript><iframesrc=*.html></iframe></noscript>网页将不能被另存为
11.<inputtype=buttonvalue=查看网页源代码
οnclick="window.location=view-source:+<img src="pic/url.gif" align=absmiddle border=0> http://www.csdn.net/";;;;>
12.怎样通过asp的手段来检查来访者是否用了代理
<%ifrequest.servervariables("http_x_forwarded_for")<>""then
response.write"<fontcolor=#ff0000>您通过了代理服务器,"&_
"真实的ip为"&request.servervariables("http_x_forwarded_for")
endif
"%>
    <% response.write"
13.取得控件的绝对位置
//javascript
<scriptlanguage="javascript">
functiongetie(e){
vart=e.offsettop;
varl=e.offsetleft;
while(e=e.offsetparent){
t+=e.offsettop;
l+=e.offsetleft;
}
alert("top="+t+"/nleft="+l);
}
</script>
//vbscript
<scriptlanguage="vbscript"><!--
functiongetie()
dimt,l,a,b
seta=document.all.img1
t=document.all.img1.offsettop
l=document.all.img1.offsetleft
whilea.tagname<>"body"
seta=a.offsetparent
t=t+a.offsettop
l=l+a.offsetleft
wend
msgbox"top="&t&chr(13)&"left="&l,64,"得到控件的位置"
endfunction
--></script>
14.光标是停在文本框文字的最后
<scriptlanguage="javascript">
functioncc()
{
vare=event.srcelement;
varr=e.createtextrange();
r.movestart(character,e.value.length);
r.collapse(true);
r.select();
}
</script>
<inputtype=textname=text1value="123"οnfοcus="cc()">
15.判断上一页的来源
asp:
request.servervariables("http_referer")
java script:
document.referrer
16.最小化、最大化、关闭窗口
<objectid=hh1classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11">
<paramname="command"value="minimize"></object>
<objectid=hh2classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11">
<paramname="command"value="maximize"></object>
<objectid=hh3classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11">
<paramname="command"value="close"></object>
<inputtype=buttonvalue=最小化οnclick=hh1.click()>
<inputtype=buttonvalue=最大化οnclick=hh2.click()>
<inputtype=buttonvalue=关闭οnclick=hh3.click()>
本例适用于ie
17.
<%
定义数据库连接的一些常量
constadopenforwardonly=0游标只向前浏览记录,不支持分页、recordset、bookmark
constadopenkeyset=1键集游标,其他用户对记录说做的修改将反映到记录集中,但其他用户增加或删除记录不会反映到记录集中。支持分页、recordset、bookmark
constadopendynamic=2动态游标功能最强,但耗资源也最多。用户对记录说做的修改,增加或删除记录都将反映到记录集中。支持全功能浏览(access不支持)。
constadopenstatic=3静态游标,只是数据的一个快照,用户对记录说做的修改,增加或删除记录都不会反映到记录集中。支持向前或向后移动
constadlockreadonly=1锁定类型,默认的,只读,不能作任何修改
constadlockpessimistic=2当编辑时立即锁定记录,最安全的方式
constadlockoptimistic=3只有在调用update方法时才锁定记录集,而在此前的其他操作仍可对当前记录进行更改、插入和删除等
constadlockbatchoptimistic=4当编辑时记录不会被锁定,而更改、插入和删除是在批处理方式下完成的
constadcmdtext=&h0001
constadcmdtable=&h0002
" %>
18.网页不会被缓存
htm网页
<metahttp-equiv="pragma"content="no-cache">
<metahttp-equiv="cache-control"content="no-cache,must-revalidate">
<metahttp-equiv="expires"content="wed,26feb199708:21:57gmt">
或者<metahttp-equiv="expires"content="0">
asp网页
response.expires=-1
response.expiresabsolute=now()-1
response.cachecontrol="no-cache"
php网页
header("expires:mon,26jul199705:00:00gmt");
header("cache-control:no-cache,must-revalidate");
header("pragma:no-cache");
19.检查一段字符串是否全由数字组成
<scriptlanguage="javascript"><!--
functionchecknum(str){returnstr.match(//d/)==null}
alert(checknum("1232142141"))
alert(checknum("123214214a1"))
//--></script>
20.获得一个窗口的大小
document.body.clientwidth,document.body.clientheight

 
Top
 
 回复人: happyamang(看到代码就晕) ( ) 信誉:100  2003-12-11 13:45:49Z  得分:2 
 
 
?
21.怎么判断是否是字符
if(/[^/x00-/xff]/g.test(s))alert("含有汉字");
elsealert("全是字符");
22.textarea自适应文字行数的多少
<textarearows=1 name=s1 cols=27 onpropertychange="this.style.posheight=this.scrollheight">
</textarea>
23.日期减去天数等于第二个日期
<scriptlanguage=javascript>
functioncc(dd,dadd)
{
//可以加上错误处理
vara=newdate(dd)
a=a.valueof()
a=a-dadd*24*60*60*1000
a=newdate(a)
alert(a.getfullyear()+"年"+(a.getmonth()+1)+"月"+a.getdate()+"日")
}
cc("12/23/2002",2)
</script>
24.选择了哪一个radio
<html><scriptlanguage="vbscript">
functioncheckme()
foreachobinradio1
ifob.checkedthenwindow.alertob.value
next
endfunction
</script><body>
<input name="radio1" type="radio" value="style" checked>style
<input name="radio1" type="radio" value="barcode">barcode
<input type="button" value="check"οnclick="checkme()">
</body></html>
25.获得本页url的request.servervariables("")集合
response.write"<tableborder=1><!--tableheader--><tr><td><b>variables</b></td><td><b>value</b></td></tr>"
foreachobinrequest.servervariables
response.write"<tr><td>"&ob&"</td><td>"&request.servervariables(ob)&"</td></tr>"
next
response.write"</table>"
26.
本机ip<%=request.servervariables("remote_addr")%>
服务器名<%=request.servervariables("server_name")%>
服务器ip<%=request.servervariables("local_addr")%>
服务器端口<%=request.servervariables("server_port")%>
服务器时间<%=now%>
iis版本<%=request.servervariables"server_software")%>
脚本超时时间<%=server.scripttimeout%>
本文件路径<%=server.mappath(request.servervariables("script_name"))%>
服务器cpu数量<%=request.servervariables("number_of_processors")%>
服务器解译引擎<%=scriptengine&"/" & scriptenginemajorversion &"." & scriptengineminorversion & "." & scriptenginebuildversion%>
服务器操作系统<%=request.servervariables("os")%>
27.enter键可以让光标移到下一个输入框
<input οnkeydοwn="if(event.keycode==13)event.keycode=9">
28.检测某个网站的链接速度:
把如下代码加入<body>区域中:
<scriptlanguage=javascript>
tim=1
setinterval("tim++",100)
b=1
varautourl=newarray()
autourl[1]="< src="pic/url.gif" align=absmiddle border=0> www.njcatv.net"
autourl[2]="javacool.3322.net"
autourl[3]="< src="pic/url.gif" align=absmiddle border=0> www.sina.com.cn"
autourl[4]="www.nuaa.edu.cn"
autourl[5]="< src="pic/url.gif" align=absmiddle border=0> www.cctv.com"
functionbutt(){
document.write("<formname=autof>")
for(vari=1;i<autourl.length;i++)
document.write("<inputtype=textname=txt"+i+"size=10value=测试中……>=》<inputtype=textname=url"+i+"size=40>=》<inputtype=buttonvalue=goοnclick=window.open(this.form.url"+i+".value)><br/>")
document.write("<inputtype=submitvalue=刷新></form>")
}
butt()
functionauto(url){
document.forms[0]["url"+b].value=url
if(tim>200)
{document.forms[0]["txt"+b].value="链接超时"}
else
{document.forms[0]["txt"+b].value="时间"+tim/10+"秒"}
b++
}
functionrun(){for(vari=1;i<autourl.length;i++)document.write("<imgsrc=http://"+autourl+"/"+math.random()+"width=1height=1οnerrοr=auto(< src="pic/url.gif" align=absmiddle border=0> http://";;;;;+autourl+")>")}
run()</script>
29.各种样式的光标
auto:标准光标
default:标准箭头
hand:手形光标
wait:等待光标
text:i形光标
vertical-text:水平i形光标
no-drop:不可拖动光标
not-allowed:无效光标
help:?帮助光标
all-scroll:三角方向标
move:移动标
crosshair:十字标
e-resize
n-resize
nw-resize
w-resize
s-resize
se-resize
sw-resize
1.本地无缓存,每次自动刷新
response.expires=0
response.addheader"pragma","no-cache"
response.addheader"cache-control","private"
2.修改contenttype并下载gif等格式
<%
functiondl(f,n)
onerrorresumenext
sets=createobject("adodb.stream")
s.mode=3
s.type=1
s.open
s.loadfromfile(server.mappath(f))
iferr.number>0then
response.writeerr.number&":"&err.description
else
response.contenttype="application/x-gzip"
response.addheader"content-disposition:","attachment;filename="&n
response.binarywrite(s.read(s.size))
endif
endfunction
calldl("012922501.gif","t1.gif")
%>
19.检查一段字符串是否全由数字组成
<scriptlanguage="javascript"><!--
functionchecknum(str){return!//d/.test(str)}
alert(checknum("1232142141"))
alert(checknum("123214214a1"))
//--></script>
20.获得一个窗口的大小
document.body.clientwidth,document.body.clientheight
document.body.offsetwidth,document.body.offsetheight
有时还需要知道window.screentop,window.screenleft
21.怎么判断是否含有汉字
if(escape(str).indexof("%u")!=-1)alert("含有汉字");
elsealert("全是字符");
22.textarea自适应文字行数的多少
ie5.5+可以用overflow-y:visible
<textarearows=1name=s1cols=27style="overflow-y:visible">
</textarea>
23.日期减去天数等于第二个日期
<scriptlanguage=javascript>
functioncc(dd,dadd)
{
//可以加上错误处理
vard=newdate(dd.replace("-","/"))
d.setdate(d.getdate()+dadd)
alert(d.getfullyear()+"年"+(d.getmonth()+1)+"月"+d.getdate()+"日")
}
cc("2002-2-28",2)
</script>

 
Top
 
 回复人: ffjh(飞飞小剑) ( ) 信誉:89  2003-12-11 15:15:52Z  得分:0 
 
 
?
晕,给我下一下哈,我放到我网站里不删除,给大家下
我的网站
www.ffjh.net
发个给我,我提供给大家
webmaster@ffjh.com
 
Top
 
 回复人: kaipeng2000(kai) ( ) 信誉:99  2003-12-11 15:33:11Z  得分:0 
 
 
?
汗,太感动了,好人真多啊 !!!
 
Top
 
 回复人: xxrl(孔曰成仁,孟曰取E) ( ) 信誉:112  2003-12-15 09:12:35Z  得分:3 
 
 
?
http://expert.csdn.net/Expert/topic/2545/2545977.xml?temp=3.542727E-02
 
Top
 
 回复人: hjwzr(Rambo) ( ) 信誉:100  2003-12-16 17:48:32Z  得分:0 
 
 
?
up
 
Top
 
 回复人: jfly301(剑锋冷月=剑锋傲乾坤 冷月万古情=) ( ) 信誉:100  2003-12-16 18:29:50Z  得分:0 
 
 
?
真是好啊,我太感动了, 怎么现在才让我遇到这些好人啊,
感动得流眼泪了,55555555555555555555555555555555555
 
Top
 
 回复人: linyucai1996(边缘人) ( ) 信誉:98  2003-12-16 20:23:06Z  得分:0 
 
 
?
总样用ASP实现在AEESE
 
  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值