修改js bug

pull/6/head
guanghongwei 2015-01-26 11:51:12 +08:00
parent c460323c5b
commit ca3d4de819
1 changed files with 6 additions and 7 deletions

View File

@ -20,13 +20,12 @@
function search_host(text){ function search_host(text){
$("#host_unperm").children().each(function(){$(this).remove();}); $("#host_unperm").children().each(function(){$(this).remove();});
var permArray = [];
$("#host_permed").children().each(function(){
permArray.push($(this).text());
});
$("#host_all").children().each(function(){ $("#host_all").children().each(function(){
if ($(this).text().search(text) != -1){ if ($(this).text().search(text) != -1 && permArray.indexOf($(this).text()) == -1) {
{# $("#host_permed").children().each(function(){#}
{# if ($(this).text().search(text) == -1){#}
{# $("#host_unperm").append($(this).clone())#}
{# }#}
{# });#}
$("#host_unperm").append($(this).clone()) $("#host_unperm").append($(this).clone())
} }
}); });