ASP精华问题及解答(4)
1、右键菜单自己做
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head>
<body>
<OBJECT id=menu type="application/x-oleobject" classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11">
<PARAM name="Command" value="Related Topics,menu">
<PARAM name="Item1" value="中华网;http://www.china.com">
<PARAM name="Item2" value="天极网;http://www.yesky.com">
<PARAM name="Item3" value="新浪网;http://www.sina.com">
<PARAM name="Item4" value="网 易;http://www.163.com">
<PARAM name="Item5" value="互动学院;http://favorites.myrice.com">
</OBJECT>
<script language="JavaScript">
<!--
if (document.all)
document.body.onmousedown=new Function("if (event.button==2) menu.Click();")
-->
</script>
</body>
</html>
2、产生随机密码
<%
function RandomPassword(sText)
on error resume next
Randomize()
iUpperbound = int(left(sText, (len(sText)-2)))
iLowerbound = int(Year(Now) / (second(Now) 1))
iRandomNumber = int((iUpperbound - iLowerbound 1) * Rnd iLowerbound)
if len(iRandomNumber) < 6 then
do until len(iRandomNumber) = 6
iExtraDigit = int((9-0 1) * Rnd 0)
iRandomNumber = iRandomNumber