之前用Ajax 请求数据一直没出现什么问题,但是今天请求的页面突然获取不到传递过来的参数,最后发现时由于缓存的问题,可以做如下处理,即可解决问题:
<script> function showWorkFlow(para) { var strs = new Array(); //Initial an array strs = para.split(","); //split char $.ajax({ url: 'WorkFlowDataHandle.ashx?ChangeRequestId=' + strs[0] + '&ProjectItemId=' + strs[1] + '&Name=' + $("Name").val() + '&nocache=' + (new Date()).valueOf(),type: "GET",dataType: "html",error: function () { alert('Error loading document'); },success: function (result) { var items = document.getElementById("workflow"); //var tbody = items.getElementsByTagName("tbody"); items.innerHTML = ""; items.innerHTML = result; $("#workflow").toggle(); } }); } </script>原文链接:https://www.f2er.com/ajax/164190.html