javascript

Sending a form by CTRL+ENTER or just ENTER

Tell me, pliz, how to write JavaScript code, so that all absolutely forms on the page are sent by a keyboard shortcut, in add ... ibute in all forms is empty. That is, before the submission, it needs to set the action-URL. In this case, everything works.

How do I remove an element from a page using jQuery or JS?

<div class="fox-copyright" style="padding:10px 0 !important;text-indent:0 !important"><a target="_blank" title="Joom ... , detach () and empty (), but nothing works. Why is that? How do I delete the div.fox-copyright element and all its contents?

How do I open the Yandex. Maps app when I click on a link in Android?

How do I make sure that when you click on the link in the browser, the Yandex.Maps app opens, with the navigation location (coordinates)?

The onSubmit event does not work. React

There is a form component with a button: export class Form extends Component { changeDateTextHandler = ({ target }) => ... n you press enter/the button, the same action occurs. But I can't understand why the onSubmit event doesn't work on the form.

Node.js get json from the site

Interested in how to pick up json from the site and write it as json Example: const furret = require('https://pokeapi.co/api/v2/pokemon/furret');

Swiper pagination

I have three points, three slides, and in fact, when you scroll through the active class, it should change the color of the ... var swiper = new Swiper('.swiper-container', { pagination: { el: '.swiper-pagination', type: 'bullets', }, });

Asynchrony in JavaScript

I'm banging my head against the wall with an understanding of asynchrony. Please tell me, is it possible to achieve asynchro ... sable, because asynchrony will be lost? You can give an example of asynchronous code without using timers, promises, and td?

Clearing a string in javascript: removing spaces, tabs

Is it possible to clear the string by removing duplicate spaces, tabs, and line feeds, in general, so that the string is like ... for this, but it will then remove just spaces at the end and beginning of the string. Maybe there is a plugin, or a function?

Styling the drop-down list

There was a question about the styling of the list of option elements There is a drop-down list with 6 option elements inside ... "title_shops">Answer 6 content</p> </div> </div> </div> Https://jsfiddle.net/yvd6e5uc/1/

How to catch the menu click event in React Native Drawer Navigation?

I need to pass a parameter to the screen, but I didn't find how to do it. How can I display not just a screen, but a screen w ... и' } } }, { initialRouteName: 'Main' } ) export const AppNavigation = createAppContainer(MainNavigator)

Replace special html characters with regular ones

I get the code from html (ex: a > b) and want to check it for correctness. The problem is that when I get innerHTML from ... s there any js method that converts special html - special. characters in the normal ones? I don't want to reinvent the wheel

What is console. log in JavaScript?

What is console. log in JavaScript?

Whether they are the same.fadeOut () and css ("display", " none")

I started working with jQuery. When I click the button, the div "pops up" on top of all the other elements of the page, and I ... .fadeOut and. css () (which in my case) do one thing and the same thing?) P.S if anything, don't swear, I'm just a newbie)

Slider: how to make a selection of half a block?

Hello. I made a script that displays the number of selected circles. But I need to make it possible to select the gender of t ... this).attr("src","http://test.epic-mine.ru/3.png"); } }); $('#info').append(id); }); });

Iterating through an object (array) using jQuery. each

Good afternoon! I write a book on working with trade offers (TP) 1C Bitrix. Previously, I prepared a small array containing ... _ARRAY when describing getSkuID() in the function body? I would read something about it, but I don't even know where to dig.

api-maps.yandex.ru loading via javascript

Good afternoon! I need to load the map from the constructor using JS, or how to find out that the map has loaded, how to spec ... , and there ... https://tech.yandex.ru/maps/jsapi/doc/2.1/quick-start/index-docpage/ Ideally, I want to use $.getScript(...)

Analogous to push() for objects

Hello everyone. Today I faced such a problem. I needed to add elements to an associative array. There are no associative arra ... on JavaScript, so I made it as an object. Now I can't find an analog of the push() function. Tell me if anyone knows. Thanks.

reduce javascript

I'm currently trying to figure out how reduce works. I came across such a problem. There is an array that contains several ob ... mas.reduce((prev, curr, index) => { return curr.name = curr.age }, {}); } console.log(f()); Tell me what's wrong

Math.random() JS

var rand = Math.random(1, 3); alert(rand); This code always gives out approximately the following numbers: 0.265656231225, it does not respond to the range at all. Always 0. What is the problem?

How do I change the placeholder-a color via javascript?

Hello everyone I have an input, how can I change the color of placeholder-a when the focus is on input? Do something like whe ... But now there is a problem, I do not know how to work in javascript-e with pseudo-classes. Is there a solution? Who faced it?