<form id="Task1_1_1">
Keywords: <input type="text" name="twitKey" value="iphone"><br><br>
Coordinates: <input type="text" name="twitLoc" value=""><br> <br>
Scope: <input type="text" name="scope" value="10" > km<br> <br>
<button id="sendButton1_1_1">Search</button>
</form>
This is the form. I can get the values of the form through the following code.
$('#sendButton1_1_1').on('click', function(e) {
console.log($('#Task1_1_1').val());
});
Here is the output from the js console
twitKey=iphone&twitLoc=&scope=10
My question is how to get the value of twitKey by using selectors? Or do I have to parse myself? I already know I get value by id Get the value from HTML form using jquery
I want to know whether I can get the value from value name such as
name="twitKey"