日期:2014-05-16 浏览次数:20624 次
<script src="/oblog312/dhtmlHistory.js"></script>
<script language="JavaScript"> function initialize() { // 初始化框架 dhtmlHistory.initialize(); // 加入回调函数 dhtmlHistory.addListener(historyChange); } /** Our callback to receive history change events. */ function historyChange(newLocation, historyData) { //更新数据 DWRUtil.removeAllRows("goodsbody"); var arrayUrl = newLocation.split(":"); if (arrayUrl.length == 2) { document.getElementById("type").value = arrayUrl[0]; document.rentalForm.select.checked = false; document.getElementById("totalRecords").innerHTML = historyData.length; DWRUtil.addRows("goodsbody", historyData, [ addCheckbox, getName, getPrice, getCount]); } } </script>
function fillTable(goods) { dhtmlHistory.add(document.getElementById("type").value+":"+new Date().getTime(), goods); document.rentalForm.select.checked = false; document.getElementById("totalRecords").innerHTML = goods.length; DWRUtil.addRows("goodsbody", goods, [ addCheckbox, getName, getPrice, getCount]); }
<body onload="initialize();">