function array_keys( input, search_value, strict ) { // Return all the keys of an array
//
// + original by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
var tmp_arr = new Array(), strict = !!strict, include = true, cnt = 0;
for ( key in input ){
include = true;
if ( search_value != undefined ) {
if( strict && input[key] !== search_value ){
include = false;
} else if( input[key] != search_value ){
include = false;
}
}
if( include ) {
tmp_arr[cnt] = key;
cnt++;
}
}
return tmp_arr;
}
Хм.. Object.keys({firstname: 'Kevin', surname: 'van Zonneveld'}) - не оно?
Оно, спасибо за совет
Anonse erotyczne czechy
Roksa margonem
If I had known you sooner, I wouldn't have made stupid mistakes. How long your article unraveled years of confusion. Thank you so much for sharing. It would be great if you could check out my blog. 메이저놀이터
Отправить комментарий
Приветствуются комментарии:Для остальных вопросов и обсуждений есть форум.