This method is considered to be the best method currently published on the Internet to prevent viewing the source code. Of course, it depends on the method, such as entering "javascript:alert(document.documentElement.outerHTML);" in the address bar.
But it seems that after testing it a few times, simple ones without much code are ok, but for those with a lot of JS, it won’t work. If any friends know why this happens, please tell me. Thank you...