M
M
M252017-08-29 22:44:35
Bootstrap
M25, 2017-08-29 22:44:35

How to make text substitution in input on click?

How to make such a substitution as simple as possible, like the one used on the main page of Yandex?
XXfZ2n.gif

Answer the question

In order to leave comments, you need to log in

4 answer(s)
A
Anatoly, 2019-05-08
@AnatolTh

We take Pagination and edit the styles. We implement the output of the ellipsis on js/php.

A
Alfieros, 2019-05-08
@mrsexy

Here you go without bootstrap https://jsfiddle.net/03yfzqpx/
If the solution helped, please answer as the correct answer.

S
Sergey Sokolov, 2017-08-29
@M25

document
  .getElementById('e-example')
  .addEventListener('click', function(){
    document.getElementById('search').value = this.innerText;
  });

Fiddle
ef748af96dc149ca8580c9fb97baa66a.png

M
makskunda22, 2017-08-29
@makskunda22

when you click to fill in the data in the field, what's difficult?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question