Redirect to the next record automatically

Hello everyone ;
I want to know , how can i redirect to the next record automatically using JS.

Thank u for ur help