var fileSave = new ActiveXObject("MSComDlg.CommonDialog"); fileSave.MaxFileSize = 128; fileSave.Filter = "*.bmp"; fileSave.FilterIndex = 2; fileSave.fileName = mydate.toLocaleString().replace(" ", "").replace("年", "").replace("月", "").replace("日", "").replace(reg, ""); fileSave.DialogTitle = "选择图片存储路径"; fileSave.ShowSave(); var path=fileSave.fileName+".bmp";
参数说明:
fileSave.ShowOpen();//打开文件
fileSave.ShowSave();//指定目录