| 类别: | Javascript, function |
|---|---|
| 标签: | jscript, vbs, executeglobal, fLoadingVbs, loading |
| 摘要: | .. |
| 正文: |
1. vbscript.asp
2. byfile.asp 3. bystring.asp 1. vbscript.asp function fRndNum(byval iUnder,byval iOver) Randomize fRndNum=Int((iOver - iUnder + 1) * Rnd + iUnder) end function 'fRndNum shawl.qiu code' 2. byfile.asp <%@LANGUAGE="JAVASCRIPT" CODEPAGE="65001"%> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>shawl.qiu template</title> </head> <body> <% var Ar = fStream("vbscript.asp", "utf-8", true); //Response.Write("<xmp>"+Ar+"</xmp>"); function fStream(sPath, sCharset, bCov) { // shawl.qiu code, return array if(bCov) sPath = Server.MapPath(sPath); var Stream = new ActiveXObject("Adodb.Stream"); Stream.Type = 2; Stream.Mode = 3; Stream.Open; Stream.LoadFromFile(sPath); if(sCharset) Stream.CharSet = sCharset; var iStep =0; if(/utf\s*\-\s*8|unicode/i.test(sCharset)) iStep = 2; Position = iStep; var Ar = [Stream.ReadText()]; delete Stream; return Ar; } // end function fStream(sPath, sCharset) fLoadingVbs(Ar[0]); Response.Write(fRndNum(1, 10)); %> <script runat="server" language="vbscript"> function fLoadingVbs(Ar) ExecuteGlobal Ar end function </script> </body> </html> 3. bystring.asp <%@LANGUAGE="JAVASCRIPT" CODEPAGE="65001"%> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>shawl.qiu template</title> </head> <body> <% var Ar = [ " function fRndNum(byval iUnder,byval iOver)\n" ," Randomize\n" ," fRndNum=Int((iOver - iUnder + 1) * Rnd + iUnder)\n" ," end function 'fRndNum shawl.qiu code'\n" ]; fLoadingVbs(Ar.join("")); Response.Write(fRndNum(1, 10)); %> <script runat="server" language="vbscript"> function fLoadingVbs(Ar) ExecuteGlobal Ar end function </script> </body> </html> |
| 文章相关信息: | |
|---|---|
| 主题: | jscript 动态 加载 vbs 函数 fLoadingVbs |
| 发表者: | shawl.qiu |
| 电子邮件: | shawl.qiu@gmail.com |
| QQ: | 908202921 |
| MSN: | btbtd@msn.com |
| Homepage: | http://www.btbtd.org/ |
| Blog: | http://blog.csdn.net/btbtd/ |
| 发表日期: | 2007-9-15 0:06:29 |
| 更新日期: | 2007-9-15 0:06:29 |
| 来源引用: | shawl.qiu CSharp DotNet 个人资料管理系统 |
| 引用本页: | http://gi.2288.org/mod/code/display/Default.aspx?aid=612 |