how to set a reload event in javascript code example Example: refresh javascript location.reload(); Works like refresh button.