how to disable right click, f12(debug) and ctrl+s in asp.net application using javascript or jquery

前端 未结 4 1231
抹茶落季
抹茶落季 2021-01-29 12:42

how to disable right click, f12(debug) and ctrl+s in asp.net application using javascript or jquery.. Have to black ctrl+s --> Do not allow to save the page Have to black f12

4条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-29 13:35

    "Do not allow to save the page" - This is impossible, as this would require not delivering the page to the user in the first place.

    "Do not allow to inspect/debug/view source of the page" - This is also impossible. In Chrome you can prepend view-source: to the URL, and you can get to developer tools with Menu -> Tools -> Developer Tools. In any case, the browser has to have access to the source code to actually display the page.

    What you are trying to do is impossible. There is also absolutely no reason to. (It's also highly annoying to legitimate users who actually want to right click!) If you're trying to do this for "security," this is most definitely not your biggest problem. If there's any insecure information delivered to client side, you have to redesign your entire system immediately.

提交回复
热议问题