<div class="father">
<span class="label label-default" id="dianji">点击跳转</span>
<span class="label label-primary" id="daochu">导出文件</span>
<span class="label label-success" id="down">下载文件</span>
</div>
点击事件如下 :
$("#down").on("click",function (){
// 如果要用ajax 发送的话,则浏览器没有任何反应 因为ajax返回的格式是 字符的格式
/* $.ajax({
url:"${ctx}/down",
type:"POST",
dataType:"json",
success:function(result){
}
}); */
// 用下面的方式 则浏览器有反应
window.location.href="${ctx}/down";
});