本地跨域测试方法:
-
Open Notepad
Click File | Open in Notepad and browse to:
C:\Windows\System32\drivers\etcMake sure the etc folder is highlighted (selected). Now change the file type so it reads "All files". You should now see the HOSTS file appear in the directory list.
Double-click the HOSTS file and it will open in Notepad for editing.
Tips:
In Windows 7, you will not be able to save edits to the HOSTS file unless you open it directly from Notepad (follow the steps described above).