88
99< body style ="height:3000px ">
1010
11- < h2 > Click the button below </ h2 >
11+ < h2 > Кликните на кнопку ниже </ h2 >
1212
13- < input type ="button " value ="Click to show the form " id ="show-button ">
13+ < input type ="button " value ="Кликните, чтобы увидеть форму " id ="show-button ">
1414
1515
1616 < div id ="prompt-form-container ">
1717 < form id ="prompt-form ">
1818 < div id ="prompt-message "> </ div >
1919 < input name ="text " type ="text ">
2020 < input type ="submit " value ="Ok ">
21- < input type ="button " name ="cancel " value ="Cancel ">
21+ < input type ="button " name ="cancel " value ="Отмена ">
2222 </ form >
2323 </ div >
2424
2525 < script >
26- // Show a half-transparent DIV to "shadow" the page
27- // (the form is not inside, but near it, because it shouldn't be half-transparent )
26+ // Показать полупрозрачный DIV, чтобы затенить страницу
27+ // (форма располагается не внутри него, а рядом, потому что она не должна быть полупрозрачной )
2828 function showCover ( ) {
2929 let coverDiv = document . createElement ( 'div' ) ;
3030 coverDiv . id = 'cover-div' ;
3131
32- // make the page unscrollable while the modal form is open
32+ // убираем возможность прокрутки страницы во время показа модального окна с формой
3333 document . body . style . overflowY = 'hidden' ;
3434
3535 document . body . append ( coverDiv ) ;
@@ -56,7 +56,7 @@ <h2>Click the button below</h2>
5656
5757 form . onsubmit = function ( ) {
5858 let value = form . text . value ;
59- if ( value == '' ) return false ; // ignore empty submit
59+ if ( value == '' ) return false ; // игнорируем отправку пустой формы
6060
6161 complete ( value ) ;
6262 return false ;
@@ -94,8 +94,8 @@ <h2>Click the button below</h2>
9494 }
9595
9696 document . getElementById ( 'show-button' ) . onclick = function ( ) {
97- showPrompt ( "Enter something <br>...smart :)" , function ( value ) {
98- alert ( "You entered : " + value ) ;
97+ showPrompt ( "Введите что-нибудь <br>...умное :)" , function ( value ) {
98+ alert ( "Вы ввели : " + value ) ;
9999 } ) ;
100100 } ;
101101 </ script >
0 commit comments