<script src="http://pv.sohu.com/cityjson?ie=utf-8"></script>
<script> console.log(returnCitySN["cip"]+','+returnCitySN["cname"]) </script>
JS命名空间是啥
var c=c||{};
c.person=function(name){
this.name=name;
}
var b=new c.person("maomin")
c.person.prototype.getname=function(){
console.log(this.name);//maomin
}
b.getname();
var b={
d:function(name){
this.name=name;
this.f=function() {
console.log(this.name)
}
}
}
var g=new b.d("xqm");
g.f();
。。。。。。。。。。。。。
作者:Vam的金豆之路
篇幅有限更多请见扩展链接:
http://www.mark-to-win.com/tutorial/50944.html