开发者

If I changing a Javascript native code will it affect the jQuery functions?

开发者 https://www.devze.com 2023-02-23 02:38 出处:网络
I want to prevent users from inserting javascript commands in the url to prevent them from changing hidden input field values and submitting it to the database.

I want to prevent users from inserting javascript commands in the url to prevent them from changing hidden input field values and submitting it to the database.

So if I change some native functions at the end of each page for example.

document.getElementById = function(a){ alert('no!') }开发者_JAVA百科

Will it mess up jQuery from getting ids and classes in its executions?


I wouldn't bother doing that as there is no way to prevent what you're trying to prevent. This should instead be handled server-side. And yes, it will.

0

精彩评论

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