---
title: "how to get text box value in jQuery"  
description: "how to get text box value in jQuery"  
author: "Anonymous User"  
published: 2018-06-18  
updated: 2018-06-18  
canonical: https://www.mindstick.com/forum/34520/how-to-get-text-box-value-in-jquery  
category: "jquery"  
tags: ["jquery"]  
reading_time: 1 minute  

---

# how to get text box value in jQuery

how to get [text](https://www.mindstick.com/blog/301635/did-people-reinvent-texting-to-express-the-full-range-of-emotions) box [value in jQuery](https://www.mindstick.com/forum/34521/how-to-get-drop-down-selected-value-in-jquery)

## Replies

### Reply by Prakash nidhi Verma

[Value](https://www.mindstick.com/articles/23219/an-optimized-description-adds-value-to-experience-and-in-turn-effectively-guest-posting-packages)() in jquery :

Use this .val() method:

If you've got an input with an id of #mindstick you can use the following code to access the value of the text box:

```
$("#Mindstick").val() You can also use the val(string) method to set that value:
$("#Mindstick").val("Software")
```

or

Use this code for using class :

```
<input type="text" id="mindstick" class="textbox" value="1">$(document).ready(function(){   alert($("#mindstick").val());   alert($(".textbox").val());//Not recommended });
```

Happy Coding :)


---

Original Source: https://www.mindstick.com/forum/34520/how-to-get-text-box-value-in-jquery

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
