相关疑难解决方法(0)

使用Javascript下载文件

有这个Excel文件,我希望用户能够从我的服务器下载.单击"下载"按钮后,必须有一种简单的方法来启动文件下载...但我不知道如何实现这一点.

到目前为止我有这个:(VBscript和ASP)

<head>
<script type="text/javascript" src="overzicht.js"></script>
</head>

Set fs=Server.CreateObject("Scripting.FileSystemObject")

    if (fs.FileExists("c:\file.xls"))=true then   'fake filename D:
        response.write("<input type='button' value='Download Masterfile' class='button' onclick='exportmasterfile();' /><br />")
    else
        response.write("Masterfile not found. <br />")
    end if

    set fs=nothing
Run Code Online (Sandbox Code Playgroud)

javascript函数为空.

javascript vbscript asp-classic

9
推荐指数
3
解决办法
7万
查看次数

window.location.href在Safari中不起作用

为什么这不适用于Safari?

<script language="javascript" type="text/javascript">
function changeUrl(url) {
  window.location.href='http://google.com';
  return false;
}
</script>

<form action="#" onsubmit="changeUrl(this)" />
  <input type="Submit" value="Go" />
</form>
Run Code Online (Sandbox Code Playgroud)

html javascript safari

4
推荐指数
1
解决办法
2万
查看次数

标签 统计

javascript ×2

asp-classic ×1

html ×1

safari ×1

vbscript ×1