How can i stop function(=in js file) in jsp

First, I can’t speak english well. Sorry if the translation is weird.

I want make stop reload.
If I push search button, page reload.
So I want make don’t reload.
But reload function in js file.
This js file is include and use many jsp file.
If I modify the reload function in my js file, it will affect many files that use it.
So I want to know how to disable the function from running only within the jsp file, invalidate the function, or remove the function.

Expect me not to relode