Retrieving Content Values in JQuery

Goud.Kv
Posted by Goud.Kv under jQuery category on | Points: 40 | Views : 1339
Below Code part helps you to retrieve the Content Values in JQuery.

$("p").click(function () {
var stringhtml = $(this).html();

// obtain html string from paragraph

$(this).text(stringhtml);

// overwrite paragraph text with new string value

});

var value1 = $('input#username').val();

// textfield input value

var value2 = $('input:checkbox:checked').val();

// get the value from a checked checkbox

var value3 = $('input:radio[name=bar]:checked').val();

// get the value from a set of radio buttons

Comments or Responses

Login to post response