手机
当前位置:查字典教程网 >编程开发 >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获取变量

JavaScript的9种继承实现方式归纳

精彩图片推荐 渐隐渐现

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

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

一个很简单的办法实现TD的加亮效果.

html代码调试脚本

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

用于table内容排序

简单实用的网页表格特效

精品推荐
分类导航