Greetings It is necessary to create a page where in the middle there would be one button "Login", clicking on which OVER it would appear a window where you need to enter "login" and "password". Please tell me how to make a pop-up window for entering data when you press the "INPUT" button?

  • 2
    You take an IDE or at least a notepad, a browser and write. - user207618

2 answers 2

If the question is about the layout of the pop-up window, then something like this: html:

<div id="btn" onclick="showWindow()">Вход</div> <div id="content_window">Тут форма</div> 

css:

 #btn{ position:absolute; top: 50vh; left: 50vw; z-index:1; } #content_window{ position:absolute; height:100vh; width:100vw; z-index:10; background:lightgrey; display:none; } 

js:

 function showWindow(){ var el = document.getElementById("content_window"); el.style.display = 'block'; } 

And if the question is about creating a working login form with the client and server parts, then it is quite broad and the correct answer is to run the program, or search for a ready-made solution)

    Use, for example, basic auth: Wiki description

    Upd: I will explain. You make a static page, on it the INPUT button. By clicking on the button - make the transition to a page in a protected zone.