How to Set the Value of Input Text Box using jQuery

  1058 views   2 years ago jQuery

Use the jQuery val() Method

You can simply use the jQuery val() method to set the value of an input text box.

Try out the following example to see how it actually works:

<!DOCTYPE html>
<html lang="en">
<title>jQuery Set Value of Input Text Box</title>
<script src=""></script>
    <label>Enter Website URL:</label>
    <input type="text" id="myInput">


Author : Harsukh Makwana
Harsukh Makwana

Hi, My name is Harsukh Makwana. i have been work with many programming language like php, python, javascript, node, react, anguler, etc.. since last 5 year. if you have any issue or want me hire then contact me on [email protected]