It will be very good if you help me do this guys ! thanks a million in advance
//Something like this I am thingking
$(document).on('mousedown',function(){
//code that prevents cursor leaving a page
});
It will be very good if you help me do this guys ! thanks a million in advance
//Something like this I am thingking
$(document).on('mousedown',function(){
//code that prevents cursor leaving a page
});
I'm not sure it is possible to prevent mouse move.
But, an approach would be to track mouse x/y position and alert user when he's going off the page.
Look this SO answer about mouse tracking.