通过一个button导出2个报告

我试图通过一个button打开2个报告,使我们的过程更快一点。 一切工作正常,如果我只在“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> 

我也试过

 <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> 

有任何想法吗?

谢谢。

您需要在popup窗口中打开每个报告。 使用window.open(“URL”)而不是window.location.href来做到这一点。