var id = localStorage.getItem("id"); var fileType = localStorage.getItem("fileType"); $(function () { findFileList(id,fileType); }); function findFileList(id,fileType){ $.ajax({ type:"post", url:bonuspath + "/backstage/machine/findFileList", data:{ id:id, fileType:fileType }, dataType:"Json", success: function(data){ var obj = data.obj; var list = obj.list; var html = ""; if(list.length>0){ for(var i = 0; i"; html += ''; html +='
'+fileName+' '; html+='' } }else{ html += "
  • 没有相关数据
  • "; } $("#ulDiv").append(html); }, error: function(XMLHttpRequest,textStatus, errorThrown){ alert("未连接到服务器,请检查网络!"+textStatus); } }); } function viewPdf(path){ path = decodeURIComponent(path); // alert(decodeURIComponent(path)); // alert(encodeURIComponent(path)); window.open(bonuspath+path); }