It only takes two minutes to read


The reason to use code

There’s always a case where you have a code on the CSDN and you type it yourself.

Reasons for not wanting to log in

  • Not your own computer
  • lazy

To make a long story short

Unlike some other sites to prevent replication means is to use JavaScript, the kind of Settings in F12 debugger can be disabled JavaScript.

CSDN is to give you no permission to select the code without logging in, so we just need to increase our operation permission, expand our operation space so that it can be selected.

The designMode attribute is used primarily.

Document. designMode controls whether the entire document is editable. Valid values are “on” and “off”. According to the specification, this property defaults to “off”. Firefox follows this standard. Earlier versions of Chrome and Internet Explorer default to “inherit”. Starting with Chrome 43, the default value is “off” and “inherit” is no longer supported. In IE6 to IE10, the value is uppercase.

So just go to the F12 console and type Document. designMode=’on’ and press Enter.

The remaining

CTRL+C, there’s nothing left to say.


Over 👋