You can't design a website that would prevent you from leaving the page (just imagine how quickly and easily this could be misused). If it's in a school, they may have additional software in place to prevent students from doing whatever they want with the computers, but you would need to talk with the administrator of these computers. Ultimately, coercing rarely works. If someone doesn't want to do your task, forcing them to do it won't give you reliable data. I'm also 99% sure that it would be a violation of your IRB. The best you can do is to reward them for completing the survey.