JavaScript技术

JavaScript技术

用JavaScript检查大写键(Caps Lock)是否打开的脚本

阅读(23) 作者(admin)

在用户遇到需要输入密码的页面时候,密码中是否有大写字母?大写键(Caps Lock)是否打开?如果能给用户以提示,岂不是更好?

下面的示例代码给出了方法,必要的说明代码当中都有注释。 问中知识点:event.keyCode 和 event.shiftKe...

JavaScript技术

ECMAScript 基础知识

阅读(19) 作者(admin)

JavaScript的核心之一ECMAScript的语言特性和Java、C、Perl都有许多相似之处,其中不少特性都是从这些语言借鉴而来,同时它们之间也存在许多差异。下面列举一些ECMAScript的基本特性。

--和Java一样,ECMAScript区分...

JavaScript技术

jscript之List Excel Color Values

阅读(17) 作者(admin)

Description

Demonstration script that displays the various colors -- and their related color index -- available when programmatically controlling Microsoft Excel. Script Code 复制代码 代码如下:set...

JavaScript技术

Add a Picture to a Microsoft Word Document

阅读(21) 作者(admin)

Demonstration script that adds a picture (C:/Scripts/Logo.jog) to a Microsoft Word document复制代码 代码如下:Set objWord = CreateObject("Word.Application") objWord.Visible = True Set objDoc = objWord....

JavaScript技术

Add a Formatted Table to a Word Document

阅读(21) 作者(admin)

Demonstration script that retrieves service data from a computer and then displays that data in a formatted table in Microsoft Word. 复制代码 代码如下:Set objWord = CreateObject("Word.Application") o...

JavaScript技术

Add Formatted Text to a Word Document

阅读(19) 作者(admin)

Demonstration script that displays formatted data in a Microsoft Word document. 复制代码 代码如下:Set objWord = CreateObject("Word.Application")

objWord.Visible = True Set objDoc = objWord.Documents...

JavaScript技术

Add a Table to a Word Document

阅读(18) 作者(admin)

Demonstration script that retrieves service information from a computer and then displays that information in tabular format in Microsoft Word.复制代码 代码如下:Set objWord = CreateObject("Word.Applic...

JavaScript技术

用jscript实现新建word文档

阅读(23) 作者(admin)

Demonstration script that creates and displays a new Microsoft Word document.复制代码 代码如下:Set objWord = CreateObject("Word.Application") objWord.Visible = True Set objDoc = objWord.Documents.Add(...

JavaScript技术

Use Word to Search for Files

阅读(23) 作者(admin)

Demonstration script that uses Microsoft Word to locate all the .mp3 files stored on drive C of the local computer复制代码 代码如下:Set objWord = CreateObject("Word.Application") Set objDoc = objWord....

JavaScript技术

Open and Print a Word Document

阅读(20) 作者(admin)

Demonstration script that opens and prints and existing Microsoft Word document. 复制代码 代码如下:Set objWord = CreateObject("Word.Application") Set objDoc = objWord.Documents.Open("c:/scripts/invent...

JavaScript技术

use jscript Create a SQL Server database

阅读(26) 作者(admin)

Create a SQL Server database.复制代码 代码如下:DB_SIZE_IN_MEGABYTES = 5 strDBServerName = "."

Set objSQLServer = CreateObject("SQLDMO.SQLServer") objSQLServer.LoginSecure = True objSQLServer.Connect...

JavaScript技术

Convert Seconds To Hours

阅读(16) 作者(admin)

Converts time in seconds to hours, minutes, and seconds复制代码 代码如下:intTotalSecs = 15438 intHours = intTotalSecs / 3600 intMinutes = (intTotalSecs Mod 3600) / 60 intSeconds = intTotalSecs Mod 60...

JavaScript技术

Save a File Using a File Save Dialog Box

阅读(15) 作者(admin)

Demonstration script that allows you to enter a file name in a File Save dialog box, and then saves a sample text file (consisting entirely of the current date) under that file name.

Supported Plat...

JavaScript技术

Locate a File Using a File Open Dialog Box

阅读(15) 作者(admin)

Demonstration script that displays a File Open dialog box (open to the folder C:/Scripts), and then echoes back the name of the selected file. Supported Platforms

Windows Server 2003 No

Windows...

JavaScript技术

用jscript实现列出安装的软件列表

阅读(23) 作者(admin)

Returns a list of software that was installed on a computer using Windows Installer. This information is then written to a text file. This script requires both Windows PowerShell and the corresponding...

JavaScript技术

Display SQL Server Login Mode

阅读(18) 作者(admin)

Display SQL Server Login Mode.

Supported Platforms

SQL Server 2000 Yes

Script Code

SQLDMOSecurity_Integrated = 1 SQLDMOSecurity_Mixed = 2 SQLDMOSecurity_Normal = 0 SQLDMOSecu...