Object inheritance
var o = { r: };var c = function f() {};c.prototype = o;cr = ;alert(or);//The inherited attribute value has not changed. alert(cr);//C overwrites the properties in o.
How to call the r attribute in o.
var o = { r: };var c = function f() {};c.prototype = o;alert(or);// The inherited attribute value has not changed. alert(cr);//Query the r attribute and return the undefined value. alert(c.prototype.r);// r in c overwrites the properties in o.The call should be done using the prototype.
The above is the relevant knowledge about JavaScript must-know (7) js object inheritance introduced by the editor. I hope it will be helpful to everyone. If you have any questions, please leave me a message and the editor will reply to everyone in time. Thank you very much for your support to Wulin.com website!