0

I would like to lock users on the page. The users can go on other tabs or desktop at least when they click on other tab of browser I would like to show them alert dialog which say "Are you sure?"

4

1 回答 1

0

Hi guys Thanks for helping

I find code which is I need :

  requestFullscreen = () => {
    if (!document.fullscreenElement) {
      document.documentElement.requestFullscreen();
    } else if (document.exitFullscreen) {
      document.exitFullscreen();
    }
  };

then I called this function onClick event on Button. After that I will check when User try to left page (alt+f4, alt+tab .. etc) I will show alert for "Are you sure for left page "

于 2019-08-20T11:41:05.343 回答