手机
当前位置:查字典教程网 >编程开发 >Javascript教程 >Save a File Using a File Save Dialog Box
Save a File Using a File Save Dialog Box
摘要:DemonstrationscriptthatallowsyoutoenterafilenameinaFileSavedialogbox,a...

DemonstrationscriptthatallowsyoutoenterafilenameinaFileSavedialogbox,andthensavesasampletextfile(consistingentirelyofthecurrentdate)underthatfilename.

SupportedPlatforms

WindowsServer2003

No

WindowsXP

Yes

Windows2000

No

WindowsNT4.0

No

Windows98

No

ScriptCode

复制代码 代码如下:

SetobjDialog=CreateObject("SAFRCFileDlg.FileSave")

objDialog.FileName="C:ScriptsScript1.vbs"

objDialog.FileType="VBScriptScript"

intReturn=objDialog.OpenFileSaveDlg

IfintReturnThen

SetobjFSO=CreateObject("Scripting.FileSystemObject")

SetobjFile=objFSO.CreateTextFile(objDialog.FileName)

objFile.WriteLineDate

objFile.Close

Else

Wscript.Quit

EndIf

【Save a File Using a File Save Dialog Box】相关文章:

js+cookies实现悬浮购物车的方法

jQuery插件bgStretcher.js实现全屏背景特效

创建你的第一个AngularJS应用的方法

javascript组合使用构造函数模式和原型模式实例

JavaScript中的splice()方法使用详解

accesskey 提交

jQuery插件实现适用于移动端的地址选择器

简单实用的网页表格特效

新闻一段时间向上滚动效果

JS/Jquery判断对象为空的方法

精品推荐
分类导航