参考自
Remix has 3 different environment options that can be used to deploy/test Solidity contracts: JavaScript VM, Injected Web3, and Web3 Provider. This option can be changed under the Environment drop down under the Run tab.
JavaScript VM:
This is Remix’s own internal sandbox. It does not connect to MainNet, TestNet, or any private network. It’s an in-memory blockchain that can be used for simple testing and quick mining.
Injected Web3:
This is the option to use for the browser plugin (MetaMask). Here, you are telling Remix to defer all control of the blockchain integration to the MetaMask plugin. At this point, MetaMask con