Answer the question
In order to leave comments, you need to log in
How to get users.get vk api by entering link in input?
I want to get users.get data by entering a link to the VK page in the input without a button and refreshing the page. Here is a clear example in the photos or a link to the direct source:
Link to the source
Answer the question
In order to leave comments, you need to log in
elem = document.getElementById('inputId');
elem.onchange = function() {
//Работайте с users.get внутри этой функции.
//сработает при изменении значения инпут
//для сокращения количества запросов в users.get можете также здесь сделать if() с
//парсингом строки: если строка начинается
//с "vk.com/" то начать запрашивать users.get.
//До тех пор просто слушать
}
alternatively make 2 inputs transparent, wrap them with a div and style it as a single input field and you will be happy.
Something like this https://jsfiddle.net/xNPC/de4wt59g/
Here it is conveniently painted i-leon.ru/udobnoe-pole-input-dlya-telefona
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question