我想要做的是,将守则中的每一警示改变为习惯警示(“青年使用的警示”)。
var hardCodedAlert = alert; //I know this won t work.But what to do ?
window.alert=function(){
if(this.count == undefined)
this.count=0;
this.count=this.count+1;
if(this.count == 1)
hardCodedAlert("You used alert");
};