开发者

How to prevent user from entering data into a form without changing the code?

开发者 https://www.devze.com 2023-03-04 23:38 出处:网络
I would like to know how to prevent the user from entering data into a f开发者_如何学运维orm without changing the code or adding Disabled attribute.

I would like to know how to prevent the user from entering data into a f开发者_如何学运维orm without changing the code or adding Disabled attribute.

For example, blocking the field to clear a given picture.

I can't apply such a scheme because the data did not persist.

$('.marker input').attr({
    disabled: 'disabled'
});


Based on your comment (different roles) I would strongly recommend a server-side solution. Any javascript solution can easily be circumvented by simply disabling javascript.


Use the readonly attribute:

$('.marker input').attr({
    readonly: 'readonly'
});
0

精彩评论

暂无评论...
验证码 换一张
取 消