Are you first timer at lazacode.org? Why not join us and start exchange your knowledge with everyone. Register today!

jQuery .val() method

0 votes
3 views
added Feb 9 in jQuery by LC Marshal First Warrant Officer (8,170 points)

Get value for selected option

var property_type = $('#property_type option:selected').val();

1 Example

0 votes
responded Apr 2 by LC Marshal First Warrant Officer (8,170 points)

Add value to button upon click

<p>Name: <input type="text" name="user"></p>
$("button").click(function(){
    $("input:text").val("Get this value upon click);
});
lazacode.org - Malaysia based Knowledge Exchange Platform, where you can share your finding or solution with other members of community.
...