脚 本 之 家 www.jb51.net
页面导航:  不限条件-->JScript
本地搜索:
Create a SQL Server database.[code]DB_SIZE_IN_MEGABYTES = 5strDBServerName = "."Set objSQLServer = CreateObject("SQLDMO.SQLServer")objSQLServer.LoginSecure = TrueobjSQLServer.Connect strDBServerNameSet objDB = Creat...
http://www.jb51.net//article/10348.htm
Demonstration script that retrieves network adapter data from a computer, displays that data in a Microsoft Word document, and then saves the document as C:\Scripts\Word\Testdoc.do...
http://www.jb51.net//article/10341.htm
Demonstration script that creates and displays a new Microsoft Word document.[code]Set objWord = CreateObject("Word.Application")objWord.Visible = TrueSet objDoc = objWord.Documents.Add()[/code]...
http://www.jb51.net//article/10340.htm
DescriptionDemonstration script that displays the various colors -- and their related color index -- available when programmatically controlling Microsoft Excel. Script Code[code]set objExce...
http://www.jb51.net//article/10315.htm
DescriptionDemonstration script that reads the values stored in a spreadsheet named C:\Scripts\New_users.xls. Script Code[code]Set objExcel = CreateObject("Excel.Application")Set objWorkbook = objExcel.Wor...
http://www.jb51.net//article/10314.htm
DescriptionDemonstration script that opens an existing Excel spreadsheet named C:\Scripts\New_users.xls. [code]Set objExcel = CreateObject("Excel.Application")Set objWorkbook = objExcel.Workbooks.Open("C:\Scripts\New_use...
http://www.jb51.net//article/10313.htm
DescriptionReturns a list of software that was installed on a computer using Windows Installer. This information is then written to a text file. Script Code[code]var wbemFlagR...
http://www.jb51.net//article/10292.htm
DescriptionReturnsinformationabouttheInternetproxyserverusedbyacomputer.SupportedPlatformsWindowsServer2003YesWindowsXPYesWindows2000NoWindowsNT4.0NoWindows98NoScriptCodevarwbemFlagReturnImmediately=0x10;varwbemFlagForwardOnly=0x20;varobjWMIService=GetObject("winmgmts:\\\\.\\root\\CIMV2");varcolItem...
http://www.jb51.net//article/10291.htm
微软对条件编译的解释是:条件编译的某些典型用途包括使用 Jscript 中的新特性、在脚本中嵌入调试支持以及跟踪代码的运行。先看一段代码简单的了解下:var s=0//@cc_on+1alert(s)如果你使用的是IE可以看到,浏览器弹出的提示s的值是"1";var s=0//@cc_on+1在IE中等同于:var s=0+1条件编译为在注释中运行代码提供了途径。一般我们在编写JavaScript代码时很少用到条件编译。不过条件编译由于其本身的特性,对我们检测系统,自动识别浏览器编程却提供了方便。有一段很经典的代码:var isMSI...
http://www.jb51.net//article/10159.htm
作为模式匹配下文本替换、搜索、提取的强有力工具,正则表达式(Regular Expression)的应用已经从unix平台逐渐渗入到网络开发中了,作为服务器端/客户端的脚本开发语言JScript,正越来越多将正则表达式应用融入其中,以弥补自身在文本上处理能力的不足。在此,我们以JScript5.5版本为例,对其中的正则表达式的应用作一个概述。首先我们需要区分JScript中关于正则表达式的两个对象:Regular Expression对象和RegExp对象。前者仅包含一个特定的正则表达式实例的信息,而后者通过一个全局变量的属性来反映最近模式匹配的特性。前者在匹配前需要指定匹...
http://www.jb51.net//article/9228.htm
集合的概念在windows脚本中很常用,尤其是在wmi方面的脚本中基本都会遇到集合操作。在vbscript里遍历集合的方法很简单,For Each循环就可以达到目的。但是在jscript中如何使用集合,却困扰了我很长时间,连msdn中都找不到好的例子,令我一度悲观的认为jscript不能进行集合操作。在我几乎快要放弃的时候,又翻出一本vbscript wmi的电子书看了看,竟然找到了jscript使用集合的方法,那就是Enumerator对象,该对象专门用作枚举集合。看到这个对象你会想到什么?是不是觉得很眼熟?如果你用jscript调用过FSO的话,如何枚举Drives&n...
http://www.jb51.net//article/9132.htm
共有:44/10,当前2/5页  [首页] [上一页] 1 2 3 4 5 [下一页]  [尾页] 转到: