js 改变只读属性的值

      console.log(navigator.platform); // Win32
      Object.defineProperty(navigator, 'platform', {
        value: 'cc',
        writable: true,
        configurable: true,
        enumerable: true,
      });
      console.log(navigator.platform); // cc
posted @ 2019-01-28 17:43  Ajanuw  阅读(1793)  评论(0编辑  收藏  举报