Get the value:
The label tag is used in JS and Jquery and cannot be used to get its value like other tags:
var label=document.getElementById("id");
var value=label.value;
var value=$("#id ").val();
can be like this:
JS:
var label=document.getElementById("id");
var value=label.innerText;
Jquery:
var value=$("#id").html() ;
Assignment:
Unlike Java, JS and Jquery cannot assign value like this:
var label=document.getElementById("id");
var value=label.innerText;
value="XXXXXX";
var value=$("#id ").html();
value="XXXXXX";
can be assigned like this:
var label=document.getElementById("id");
label.innerText="XXXXXX";
$("#id") .html("XXXXX");