In IE6.0,
document.execCommand('SaveAs',false)
works.
document.execCommand('SaveAs',false)
works.
解决方案 »
- 请教一个棘手的javascript和select问题!
- 用function建立的对象如何销毁?
- 迟到的漂亮下雪效果
- 这个script语句什么意思
- 这样写能提交吗?
- 表单提交问题!
- 帮忙看看,strvalue后面怎么写
- 如何使用javascript中的方法实现vbscript中的isnumeric()的功能?
- 我是新手,需要帮助!
- 关于框架页面连接的一个简单问题,我给高分
- 谢谢 meizz(梅花雨),evonne_feng(evonne)等大虾帮助!!!
- 我想在浏览器上进行粘贴的操作,该用什么命令?被操作的对象不支持:xxx.value=window.clipboardData.getData()的方式,而且我也不想用se
<input type=button value=ok onclick="document.execCommand('SaveAs',false,'c:\\');">
最后一个参数必须是文件名字,不是目录
MSDN上是这么写的
ParameterssCommand Required. String that specifies the command to execute. This command can be any of the command identifiers that can be executed in script.
bUserInterface Optional. Boolean that specifies one of the following values. false Default. Does not display a user interface.
true Displays a user interface, if the command supports one.
vValue Optional. Variant that specifies the string, number, or other value to assign. Possible values depend on sCommand . Return ValueReturns True if the command is successful.ResDo not invoke the execCommand method until after the page loads.The bUserInterface and vValue parameters might be required depending on the command being executed.