close
  1. var Db = function() {
  2. //private fields
  3. var member = "private fields";
  4. // public fields
  5. this.menber = "public fields"
  6. //constructor
  7. constructor = function() {
  8. alert(member);
  9. }
  10. //private methods
  11. methods = function() {
  12. alert(member);
  13. //public methods
  14. this.methods = function() {
  15. alert(member);
  16. }
  17. //do constructor
  18. constructor();
  19. }

  20. var idb = new Db();
arrow
arrow
    全站熱搜
    創作者介紹
    創作者 benjamin16pp 的頭像
    benjamin16pp

    程式筆記

    benjamin16pp 發表在 痞客邦 留言(0) 人氣()