标签:nbsp str -o display output obj \n UNC splay
function displayInfo(args){
var output="";
if(typeof args.name == "string"){
output += "Name: " + args.name + "\n";
}
if(typeof args.age == "number"){
output += "Age: " + args.age + "\n";
}
alert(output);
}
<a href="javascript:displayInfo({name:‘baraka‘,age:24});">一</a>
<a href="javascript:displayInfo({name:‘Tom‘});">二</a>
标签:nbsp str -o display output obj \n UNC splay
原文地址:https://www.cnblogs.com/daochong/p/9074663.html