Javascript Ajax jQuery Html PHP Example Quiz New MORE
Need a Website Or Web Application.Contact : +91 9437911966 (Whatsapp) Note: Paid Service

How to Get and Set value in jQuery

In this example we will discuss How to GET & SET value in jQuery.

<!DOCTYPE html>
<script src=""></script>
    	var first_name=$("#first_name").val();
        var last_name=$("#last_name").val();
        alert(first_name + " " +last_name);

    <input type="text" name="first_name" value="John" id="first_name">
    <input type="text" name="first_name" value="Deo" id="last_name"><br><br>
    <button id="get">GET Value</button>
    <button id="set">SET Value</button>
Run it Yourself »