javascript 继承
来源:互联网 发布:浩格云信企业数据服务 编辑:程序博客网 时间:2024/05/01 21:50
<script type="text/javascript">
function Tune(name){
this.name=name;
this.getName=function(){
return "My name is :"+this.name;
}
}
function Person(name,age,ID){
this.age=age;
this.id=ID;
Tune.apply(this,arguments);
this.show=function(){
return (this.getName()+" "+this.age+" "+this.id);
}
}
Person.prototype=new Tune();
var son=new Person("lining",22,10002);
//alert(son.show());
eval("result={/"user1/":{/"name/":/"lining/",/"age/":/"12/"}}");
//alert(result.user1.name);
function say(hello){
//return function(){
alert(hello);
//}
}
//var l=say("hello world");
//setTimeout("say(/"hello word/")",1000);
var str=new Array("A1","B1","C1");
i=parseInt(Math.random()*10%3);
document.writeln(i);
switch(str[i]){
case "A1":alert("1A");break;
case "B1":alert("1B");break;
case "C1":alert("1C");break;
default:alert(str[i])
}
</script>
- javascript继承
- javascript继承
- javascript 继承
- Javascript继承
- Javascript继承
- javascript继承
- Javascript继承
- javascript继承
- JavaScript 继承
- javascript 继承
- JavaScript 继承
- javascript 继承
- javascript 继承
- Javascript继承
- Javascript继承
- Javascript 继承
- JavaScript 继承
- javascript继承
- HTTP POST GET 本质区别详解
- 顶级程序员的心得 - Coders at Work
- Javascript常用运算符(Operators)
- PHP MemCached 高级缓存应用代码
- ubuntu 下 hg 升级
- javascript 继承
- ubuntu 下安装 git
- 精彩网站
- 想不出标题
- axis web service工程,用ant编译并创建server-config.wsdd和wsdl文件,然后打成war
- printk 使用方法
- checkBox禁用文本框
- hashcode方法
- printk实现分析