我们正在使用 fusioncharts,它能够在客户端使用 javascript 导出 csv 数据,我们希望能够获取该数据并在浏览器中动态创建文件。那可能吗?如何?
尝试下面的代码允许您访问客户端文件系统,但这仅适用于 IE 浏览器
<html>
<body>
<script language="JScript">
<!--
function getsize()
{
var myObject, afile, size;
myObject = new ActiveXObject("Scripting.FileSystemObject");
afile = myObject.GetFile("c:\\test.txt")
size = afile.Size;
alert("The size of the test.txt file is:" + size);
}
-->
</script>
Get the size for the file "test.txt"
<form name="myForm">
<input type="Button" value="Get Size" onClick='getsize()'>
</form>
</body>
</html>
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)