<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<script language="javascript">
function ok(){
var s = document.getElementById("file");
s.click();
var str = s.value;
//获取 文件路径 alert(str);
}
function SaveAs(){
var fileSave = new ActiveXObject
("MSComDlg.CommonDialog");
fileSave.Filter = "mp3";
fileSave.FilterIndex = 2; // 必须设置MaxFileSize.
fileSave.MaxFileSize = 128;
fileSave.ShowSave();
}
</script>
<body>
<input type="file" id="file" style=" display:block"/>
<input type="button" value="click" onClick="ok()">
<input type="button" value="保存" οnclick="document.execCommand('SaveAs')">
</body>
</html>