继承
来源:互联网 发布:秒杀淘宝手机版 编辑:程序博客网 时间:2024/05/22 12:27
<html><head><script language = "javascript" type="text/javascript">//javascript中对象的继承function Stu(name,age){//公有属性this.name = name;this.age = age;//公有方法this.show = function(){window.alert(this.name+this.age);}}//继承的使用function Midstu(name,age){this.stu = Stu;//js中是通过对象冒充来实现继承的。this.stu(name,age);}//创建一个对象var stus = new Midstu('张三',20);stus.show();</script></head></html>
0 0
- 继承
- 继承
- 继承
- 继承
- 继承
- 继承
- 继承
- 继承
- 继承
- 继承
- 继承
- 继承
- 继承
- 继承
- 继承
- 继承
- 继承
- 继承
- Python-Project Euler 56
- Ext.grid.GridPanel根据某列改变行的颜色
- c++中istringstream stream(line);
- win7-64bit下硬盘安装ubuntu 12.10-64bit的方法
- navigationcontroller设置title字体
- 继承
- android中调用系统日期对话框
- Android HandlerThread Handler Looper 三类之间的联系--学习
- Why download Java?
- 2470. Matrix Commutative Multiplication 输入n要用scanf否则会WA别问我为什么我也不知道…
- android sms
- Sprite Kit编程指南(0)-简介
- shell 日志备份
- linux远程端口查看