Html & Html5

it training classes Logo

The World's best Software Development Study Portal

Javascript innerText Property

The innerText property of JavaScript is used to get or set the text inside an HTML element and its descendants. The innerText has a similar working phenomenon to innerHTML. Both properties manipulate the content of an HTML element but with different aspects. The innerText focuses on the textual content and the innerHTML considers the HTML content of an element.

Javascript innerText property can be used to write the dynamic text on the HTML document.

function validate() {
var msg;
<form name="myForm">
<input type="password" value="" name="userPass" onkeyup="validate()">
Strength:<span id="mylocation">no strength</span>


Strength:no strength

JS training insitute | Best IT Training classes in Gurgaon | Web Designing Training Institute