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.
精彩评论