I have seen some pages in which we can input in textarea and correspondingly an output gets displayed for it no button clicks in between , see an example here http://ntools.infoexpo.in/p/html-to-xml-encoder_4042.html
How to apply this type in the below code? html:
<textarea id="source" placeholder="Text Entry."></textarea>
<p id="result"> </p>
Javascript
function myFunction()
{
var str = document.getElementById('source').value;
var len = str.length;
document.getElementById("result").innerHTML="<textarea>"+len+"</textarea>";
}
If you want to call in on load of your page try this
<body onLoad="yourFunctionName();">
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With