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

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

javascript相关事件的几个概念

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

html代码调试脚本

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

accesskey 提交

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

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

简单实用的网页表格特效

javascript生成不重复的随机数

精品推荐
分类导航