Guest User

Untitled

a guest
Jul 22nd, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 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</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. function Shape(shapeName)
  13. {
  14. this.shapeName=shapeName;
  15. Shape.Count =++Shape.Count||1;
  16. Shape.showCount= function(){
  17. return Shape.Count;
  18. }
  19. }
  20. var shape1 = new Shape("circle");
  21. var shape2 = new Shape("line");
  22. var shape3 = new Shape("triangle");
  23. var shape4 = new Shape("askdlfl");
  24. document.write(Shape.showCount());
  25. </script>
  26.  
  27.  
  28.  
  29. <script id="jsbin-source-javascript" type="text/javascript">function Shape(shapeName)
  30. {
  31. this.shapeName=shapeName;
  32. Shape.Count =++Shape.Count||1;
  33. Shape.showCount= function(){
  34. return Shape.Count;
  35. }
  36. }
  37. var shape1 = new Shape("circle");
  38. var shape2 = new Shape("line");
  39. var shape3 = new Shape("triangle");
  40. var shape4 = new Shape("askdlfl");
  41. document.write(Shape.showCount());
  42. </script></body>
  43. </html>
Add Comment
Please, Sign In to add comment