手机
当前位置:查字典教程网 >编程开发 >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】相关文章:

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

jQuery基于图层模仿五星星评价功能的方法

浅谈javascript的call()、apply()、bind()的用法

accesskey 提交

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

javascript动态设置样式style实例分析

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

JQuery给网页更换皮肤的方法

javascript生成不重复的随机数

JS实现上下左右对称的九九乘法表

精品推荐
分类导航