Javascript 通过一个按钮导出2个报告

Javascript 通过一个按钮导出2个报告,javascript,html,excel,sharepoint,Javascript,Html,Excel,Sharepoint,我试图通过一个按钮打开两个报告,以使我们的过程更快一点。如果我只在“onclick”事件中添加了一个链接,那么一切都会正常工作,但只要我将两个链接都添加到一个链接中,它们就会打开 这就是我试过的 <script type="text/javascript"> function itsa() { window.location.href='http://*******/****/******/*****/_vti_bin/ows

我试图通过一个按钮打开两个报告,以使我们的过程更快一点。如果我只在“onclick”事件中添加了一个链接,那么一切都会正常工作,但只要我将两个链接都添加到一个链接中,它们就会打开

这就是我试过的

<script type="text/javascript">

        function itsa()
        {
            window.location.href='http://*******/****/******/*****/_vti_bin/owssvr.dll?CS=109&Using=_layouts/query.iqy&List={*******************}&View={**********************}&CacheControl=1';
        }

        function other()
        {
             window.location.href='http://*******/****/******/*****/_vti_bin/owssvr.dll?CS=109&Using=_layouts/query.iqy&List={*******************}&View={**********************}&CacheControl=1';
        }

        </script>


        <div class="wrapper">
            <input type="button" style="width:180px; height: 75px; background:gray; color:white;font-size:larger; font-weight:bold; left: 214px;"onclick="itsa();other();" value ="Generate Excel report"/>
       </div>

函数itsa()
{
window.location.href='http://***************/*********/*********/******/***vti_-bin/owsvr.dll?CS=109&Using=\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\缓存控制=1';
}
函数其他()
{
window.location.href='http://***************/*********/*********/******/***vti_-bin/owsvr.dll?CS=109&Using=\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\缓存控制=1';
}
我也试过了

<div class="wrapper">
            <input type="button" style="width:180px; height: 75px; background:gray; color:white;font-size:larger; font-weight:bold; left: 214px;"onclick=" window.location.href='http://*******/****/******/*****/_vti_bin/owssvr.dll?CS=109&Using=_layouts/query.iqy&List={*******************}&View={**********************}&CacheControl=1';  window.location.href='http://*******/****/******/*****/_vti_bin/owssvr.dll?CS=109&Using=_layouts/query.iqy&List={*******************}&View={**********************}&CacheControl=1';" value ="Generate Excel report"/>
</div>

有什么想法吗


谢谢。

您需要在弹出窗口中打开每个报告。使用而不是
window.location.href
来执行此操作