From 980fe00a74a9ad013b945755415ace2e5429c3c2 Mon Sep 17 00:00:00 2001 From: Alexey Pyltsyn Date: Wed, 27 Oct 2021 02:31:24 +0300 Subject: [RU] Remove notranslate (#2874) --- .../forms/sending_forms_through_javascript/index.html | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'files/ru/learn/forms/sending_forms_through_javascript') diff --git a/files/ru/learn/forms/sending_forms_through_javascript/index.html b/files/ru/learn/forms/sending_forms_through_javascript/index.html index fb58b4f06f..ecea212980 100644 --- a/files/ru/learn/forms/sending_forms_through_javascript/index.html +++ b/files/ru/learn/forms/sending_forms_through_javascript/index.html @@ -52,11 +52,11 @@ original_slug: Learn/HTML/Forms/Sending_forms_through_JavaScript

Посмотрите на пример:

-
<button>Click Me!</button>
+
<button>Click Me!</button>

И на JavaScript:

-
const btn = document.querySelector('button');
+
const btn = document.querySelector('button');
 
 function sendData( data ) {
   console.log( 'Sending data' );
@@ -119,11 +119,11 @@ btn.addEventListener( 'click', function() {
 
 

Using a standalone FormData object

-
<button>Click Me!</button>
+
<button>Click Me!</button>

You should be familiar with that HTML sample. Now for the JavaScript:

-
const btn = document.querySelector('button');
+
const btn = document.querySelector('button');
 
 function sendData( data ) {
   const XHR = new XMLHttpRequest(),
@@ -165,7 +165,7 @@ btn.addEventListener( 'click', function()
 
 

The HTML is typical:

-
<form id="myForm">
+
<form id="myForm">
   <label for="myName">Send me your name:</label>
   <input id="myName" name="name" value="John">
   <input type="submit" value="Send Me!">
@@ -173,7 +173,7 @@ btn.addEventListener( 'click', function()
 
 

But JavaScript takes over the form:

-
window.addEventListener( "load", function () {
+
window.addEventListener( "load", function () {
   function sendData() {
     const XHR = new XMLHttpRequest();
 
@@ -224,7 +224,7 @@ btn.addEventListener( 'click', function()
 
 

In the following example, we use the {{domxref("FileReader")}} API to access binary data and then build the multi-part form data request by hand:

-
<form id="theForm">
+
<form id="theForm">
   <p>
     <label for="theText">text data:</label>
     <input id="theText" name="myText" value="Some text data" type="text">
@@ -238,7 +238,7 @@ btn.addEventListener( 'click', function()
 
 

As you see, the HTML is a standard <form>. There's nothing magical going on. The "magic" is in the JavaScript:

-
// Because we want to access DOM nodes,
+
// Because we want to access DOM nodes,
 // we initialize our script at page load.
 window.addEventListener( 'load', function () {
 
-- 
cgit v1.2.3-54-g00ecf