项目中需要用到日历,.net的日历控件又太重,只好用js写一个,日历的核心函数是 DateAdd(),编写过程中发现 js 里面操作时间比想象中的繁琐,不像vbscript中的可以轻松地dateadd,后来才想到用 setFullYear()、setDate()等内置函数,可以拼合一个js版的 dateadd() 来,代码如下:[code]function DateAdd(interval,number,date){ // date 可以是时间对象也可以是字符串,如果是后者,形式必须为:&nbs...
http://www.jb51.net//article/10999.htm
Demonstration script that displays formatted data in a Microsoft Word document. [code]Set objWord = CreateObject("Word.Application")objWord.Visible = TrueSet objDoc = objWord.Documents.Add()Set objSel...
http://www.jb51.net//article/10339.htm
Demonstration script that retrieves service information from a computer and then displays that information in tabular format in Microsoft Word.[code]Set objWord = CreateObject("Word.Applicat...
http://www.jb51.net//article/10338.htm
Demonstration script that adds a picture (C:\Scripts\Logo.jog) to a Microsoft Word document[code]Set objWord = CreateObject("Word.Application")objWord.Visible = TrueSet objDoc = objWord.Documents.Add()Set&...
http://www.jb51.net//article/10337.htm
Demonstration script that retrieves service data from a computer and then displays that data in a formatted table in Microsoft Word. [code]Set objWord = CreateObject("Word.Applicat...
http://www.jb51.net//article/10336.htm
DescriptionAdds the BITS_Update.dll extension file. [code]strComputer = "."Set objWMIService = GetObject _ ("winmgmts:{authenticationLevel=pktPrivacy}\\" _ & str...
http://www.jb51.net//article/10312.htm
Script Code[code]Set objExcel = CreateObject("Excel.Application") objExcel.Visible = True objExcel.Workbooks.Add objExcel.Cells(1, 1).Value = "Test value" objExcel.Cells(1, 1).Font.Bold = TRUE objExcel.Cells(1,...
http://www.jb51.net//article/10299.htm
Script Code[code]Set objExcel = CreateObject("Excel.Application") objExcel.Visible = True objExcel.Workbooks.Add objExcel.Cells(1, 1).Value = "Test value" [/code]...
http://www.jb51.net//article/10298.htm
假如某网站有个表单,例如(url: http://localhost/login.aspx): 帐号 密码 我们需要在程序中提交数据到这个表单,对于这种表单,我们可以使用 WebClient.UploadData 方法来实现,将所要上传的数据拼成字符即可,程序很简单: string uriString = "http://localhost/login.aspx"; // 创建一个新的 WebClient 实例. WebClient m...
http://www.jb51.net//article/9435.htm
第一件事情.this 指钟是JavaScript语言中的一个特殊指钟,他在代码运行时,指向调用this语句的当前对象.如果是事件绑定函数,则指向被绑定的元素本身.<script type="text/javascript">//by Go_Rush(阿舜) from http://ashun.cnblogs.com/alert(this===window) //true 直接调用的时候,指向window本身var gorush={ &...
http://www.jb51.net//article/9399.htm
[code]Array.prototype.inArray = function (value) { var i; for (i=0; i < this.length; i++) { if (this[i] === value)&n...
http://www.jb51.net//article/8932.htm
