How to prevent the user from changing values in the HTML or the JavaScript

后端 未结 3 632
春和景丽
春和景丽 2021-01-22 14:19

I am trying to make a user can change they are changing profile text color and background color.

I created this DEMO from codepen.io

In this d

3条回答
  •  囚心锁ツ
    2021-01-22 14:47

    There is no way you can prevent users from changing stuff in their console. All the front-end code (HTML, JS, CSS) is sent to the browser, then anybody can view it and change it to their will. If you really want to limit the allowed colors, make a server-side check.

提交回复
热议问题