它在firefox中运行得很完美,但是在chrome和opera中它不起作用.
<div> has position:fixed, and is .draggable()
Run Code Online (Sandbox Code Playgroud)
它除了firefox之外不起作用
为什么Child类没有echo()方法?
Parent = function(){
this.name = 'abc';
}
Parent.prototype.echo = function(){
alert(this.name);
}
Child = function(){
$.extend(this, Parent);
}
var x = new Child();
x.echo();
Run Code Online (Sandbox Code Playgroud)
我该怎么做才能继承Javascript中的父类?