- // establish a keep callback
- searchControl.setOnKeepCallback(this, MyKeepHandler);
- function MyKeepHandler(result) {
- // clone the result html node
- var node = result.html.cloneNode(true);
- // attach it
- var savedResults = document.getElementById(\"saved_results\");
- savedResults.appendChild(node);
- }
- //该片段来自于http://www.codesnippet.cn/detail/13112012316.html
来源: http://www.codesnippet.cn/detail/13112012316.html