Prevent refresh and backspace using java script