Answer: Yes although usually it is not a good design decision to do so. (Normally, you are much better off fixing the errors, rather than just suppressing the error messages.)
you can put the following script code in the
section of your page:
Or you can use a similar code fragment
in an included .js file, if you have one.
For a working code example, see this error handling demo!