1
後,我已經實現了這樣的 http://www.erichynds.com/examples/jquery-ui-multiselect-widget/demos/#animations過濾器是越來越清除刷新
多選過濾然而刷新它持有的價值(因爲過濾記錄在UI顯示),但多選複選框是否清零後。你能否建議我在刷新後如何恢復UI中的選定值?
這是我的代碼刷新後保留從cookie的值
searchString = cookievalue.trim();
searchString = searchString.replace(/%20/g,' ');
searchString = searchString.replace(/%7C/g, '|');
//searchString = searchString.replace(/%27/g, "'");
if (searchString.indexOf(ws1) >= 0){
//j$('#first').prop('checked') = true;
document.getElementById('aa').checked = true;
}
if (searchString.indexOf(ws2) >= 0){
document.getElementById('bb').checked = true;
}
oTable.fnFilter(searchString,18,true,false);
嗨,感謝您的建議選擇,我做了samething,搜索字符串= cookievalue.trim(); \t \t \t \t searchString = searchString.replace(/%20/g,''); \t \t \t \t searchString = searchString.replace(/%7C/g,'|'); \t \t \t \t // searchString = searchString.replace(/%27/g,「'」); \t \t \t \t如果(searchString.indexOf(WS1)> = 0){ \t \t \t \t \t //j$('#first').prop('checked')= TRUE; \t \t \t \t \t document.getElementById('aa')。checked = true; \t \t \t \t} \t \t \t \t如果(searchString.indexOf(WS2)> = 0){ \t \t \t \t \t的document.getElementById( 'BB')檢查=真。 \t \t \t \t} \t \t \t \t oTable.fnFilter(searchString的,18,TRUE,FALSE);在刷新 – Ganesh 2015-02-11 04:41:37
發佈完整代碼後,它仍然得到清除,因此如果可能,我們可以重新生成並找到錯誤 – Kokizzu 2015-02-11 05:35:17
,使用http://jsfiddle.net – Kokizzu 2015-02-11 05:35:43