Guest User

Untitled

a guest
Jul 23rd, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width">
  6. <title>Javascript Demo - abstract class</title>
  7. <link rel="stylesheet" type="text/css" href="css.css" />
  8. <script type="text/javascript" src="jsC.js"></script>
  9. </head>
  10. <body>
  11. <script id="jsbin-javascript">
  12. var Shape=function(){
  13. this.shapeName=none;
  14. throw new Error("kjfkj");
  15. }
  16. Shape.prototype.draw=function(){
  17. return "Drawing "+this.shapeName;
  18. }
  19. var Circle = function(shapeName)
  20. {
  21. this.shapeName=shapeName;
  22. }
  23. Circle.prototype =Object.create(Shape.prototype);
  24. var circle = new Circle("circle");
  25. document.write( circle.draw());
  26. </script>
  27.  
  28.  
  29.  
  30. <script id="jsbin-source-javascript" type="text/javascript">var Shape=function(){
  31. this.shapeName=none;
  32. throw new Error("kjfkj");
  33. }
  34. Shape.prototype.draw=function(){
  35. return "Drawing "+this.shapeName;
  36. }
  37. var Circle = function(shapeName)
  38. {
  39. this.shapeName=shapeName;
  40. }
  41. Circle.prototype =Object.create(Shape.prototype);
  42. var circle = new Circle("circle");
  43. document.write( circle.draw());</script></body>
  44. </html>
Add Comment
Please, Sign In to add comment