JavaScript console events

JavaScript console events

  • When we use the browser to access web content we will find that you can modify the content of any web page in a browser console
  • Palliative methods are:
    • F12 key events
    • Right-click the event modifications
    • Page scroll bar event
    • and many more. . .
  • Today brings a browser console events as long as the console is turned on it will call the event

Object.defineProperty

var x = document.createElement('div');
Object.defineProperty(x, 'id', {
    get: function () {
        console.log('来了老弟!');
    }
});
console.log(x);

More detailed JS anti-calling techniques can jump to: https: //eller.tech/post/29

Published 49 original articles · won praise 39 · views 10000 +

Guess you like

Origin blog.csdn.net/qq_42920045/article/details/100574809