the innerText is used to set or retrieve the text between the start and end tags of the object.
Description
The .innerText
property sets or retrieves the text between the start and end tags of the object.
This is an IE specific property and is not supported by other browsers like FireFox, Chrome, Opera and Safari.
Syntax for Getting inner text
var text = object.innerText;
Syntax for Setting inner text
object.innerText = text;
where, text
is the string that has to be set as the inner text.