Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

input
jquery
value

How to get input value using jQuery

Educative Answers Team

jQuery is a lightweight JavaScript library that has simplified client-side webpage development by adopting a “write less, do more” ideology.

Whenever we need to take input from the user, we use the <input> tag. When using jQuery, we can also store the input value.

svg viewer

Library

You need to import this library for jQuery:

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js">

Code

In the code below, you will insert your name into the text-box and $().click() will be used to store it. This input will be saved and printed onto a web-page using the .html() function.

RELATED TAGS

input
jquery
value
Copyright ©2022 Educative, Inc. All rights reserved
RELATED COURSES

View all Courses

Keep Exploring