menu

浪漫瓜地

Avatar

看看这段代码执行的结果

虽然忙碌,但是程序员本色不能丢,业余时间自己做了一个firefox插件玩玩。
[url=http://www.chouti.com/service/chouti.xpi]
抽屉书签
[/url]
顺便温习js,大家看啊看这段代码执行结果是什么?


function Gozap(id,jid){
	this.id=id;
	this.jid=jid;
	this.groupId=0;
	this.private=0;
	this.Name="";
	this.Desc="";
	this.URL="";
}
function News(){
}
News.prototype.__proto__= Gozap.prototype;

var a=new News('ddd','222');
b=new Gozap("122","dd");
alert(a.id);
alert(b.id);


你想要一个什么结果?
:D

大家可以下载那个插件玩玩看,有什么bug告诉我哦

__proto__ js1.5的新特性...可惜FF2与IE7皆没有1.5解释引擎...

评论已关闭