页面向phpexcel传递参数的问题
页面上有导出excel按钮,怎么通过点击按钮,将页面的参数传到后台(前台页面不跳转)以导出对应的excel。
<input type="submit" id="excel" value="Save as Excel" ><br /> <br /><input type="button" id="pdf" value="Save as PDF" ></TD><br /><td><br /></td><br /><br /></tr><br /> </table><br /> </form><br /> <script><br /><br /> $(document).ready(function(){<br /> $("#excel").click(function(){<br /> $.ajax({<br /> type:"POST",<br /> url:'excel_GlobalNetwork.php',<br /> data:{area:$('#area').combobox('getValues').join(","),level:$('#level').combobox('getValues').join(","),bt:$('#bt').datebox('getValue'),et:$('#et').datebox('getValue')}<br /> });<br /> return false;<br /> });
全网最新最细最实用WPS零基础入门到精通全套教程!带你真正掌握WPS办公! 内含Excel基础操作、函数设计、数据透视表等
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号