E
E
Eugene2015-10-21 14:42:40
JavaScript
Eugene, 2015-10-21 14:42:40

How to take $url variable from input or textarea?

Hello! Added the script for getting the number of likes from the social. networks and their addition:
jsfiddle.net/ywuz4d67/4 The

question is how to change the script so that the line: Taken for example from input or textarea? Textarea in general would be great, uploaded a bunch of urls - and you see who has how many shares.

var url = 'http://htmlacademy.ru';


Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vitaly Inchin ☢, 2015-10-21
@In4in

<textarea id="href"></textarea>
-
var url = document.querySelector("#href").value;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question