function getQueryStringArgs(){
var qs = (location.search.length > 0 ? location.search.substring(1):"");
var args = {};
var items = qs.split("&");
var item = null, name = null, value = null;
for(var i=0; i < items.length; i++){
item = items[i].split("=");
name = decodeURLComponent(item[0]);
value = decodeURLComponent(item[1]);
args[name] = value;
}
return args;
}
遍历对象属性
//顺序不确定
var name;
for (name in student) {
if (typeof student[name] !== "function") {
document.writeln(name + ":" + student[name]);
}
}