write a JavaScript code to count length of accepted string after click on button
Answers
Answered by
15
<script type="text/javascript">
function check_text1_length(){
var t1=document.getElementById("text1").value;
document.getElementById("msg").innerHTML="The lenght of data = " + t1.length;
}
</script>
<input type=text name=text1 id=text1><input type=button onclick=check_text1_length(); value=Check>
<div id=msg></div>
please mark this answer as brainliest answer plzzz ☝️☝️
Similar questions