jquery set label text code example

Example 1: how to set text for label in jquery

BY LOVE
$("#lblCustomerName").text('LOVE SINGH');

Example 2: change label value jquery

// change label value
$("#labelName").text($value);

// display label html
$("#labelName").text('<font class="red"> * </font> label');
// reset combobox value
var html_options = "<option value=''>" + $('#eform_id').find("option").first().text() + "</option>";
$('#eform_id').html(html_options);
$('#eform_id').selectpicker('refresh');

Example 3: jquery label with text

var element = $("label:contains('SuperSweetCheckbox')");

Example 4: jquery change label content

$('#lblUserFullname').html(currentUser.Firstname+' '+currentUser.Lastname);

Example 5: change label value jquery

// change label valie
$("#labelName").text($val);

// reset combobox value
var html_options = "<option value=''>" + $('#eform_id').find("option").first().text() + "</option>";
$('#eform_id').html(html_options);
$('#eform_id').selectpicker('refresh');

Tags:

Html Example