Retrieving Content Values in JQuery

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

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

// obtain html string from paragraph


// 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