博文

[置顶] 随机字符串 (可用来生成随机密码)(2005-10-16 18:00:00)

摘要: <%function makePassword(byVal maxLen)Dim strNewPassDim whatsNext, upper, lower, intCounterRandomize For intCounter = 1 To maxLenwhatsNext = Int((1 - 0 + 1) * Rnd + 0)If whatsNext = 0 Thenupper = 90lower = 65Elseupper = 57lower = 48End IfstrNewPass = strNewPass & Chr(Int((upper - lower + 1) * Rnd + lower))Next makePassword = strNewPass end functiondim  radpassradpass=makePassword(6)%> ......

阅读全文(3796) | 评论:0

不让图片撑大表格又一做法(2007-04-21 10:05:00)

摘要:<img src=*****.jpg onload="if(this.width>650)this.width=650" border=0> 偶然看到,记下来!......

阅读全文(2636) | 评论:1

Option Explicit 语句(2005-11-26 09:43:00)

摘要:Option Explicit 语句强制要求显式声明脚本中的所有变量。Option Explicit 说明如果使用 Option Explicit,该语句必须出现在脚本的任何其他语句之前。使用 Option Explicit 语句时,必须使用 Dim、Private、Public 或 ReDim 语句显式声明所有变量。如果试图使用未经声明的变量名,则会出现错误。提示 可用 Option Explicit 避免拼错已存在的变量名称。对于作用范围不清楚的变量,使用此语句可避免发生混淆。下面例子举例说明如何使用 Option Explicit 语句: Option Explicit    ' 强制显示声明变量。Dim MyVar          '声明变量。MyInt = 10         '未声明变量产生错误。MyVar = 10         '声明变量不产生错误。......

阅读全文(2929) | 评论:1