You can do this:
var hasAgreed = confirm("Do you agree my terms and condition?");
If the user accepts, hasAgreed
will have true
else false
Put that in onload
event of your page and then store the response in a cookie and don't ask them next time by doing a simple if
.