开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜