Information book
C
C++
C#
ASP.NET
MVC
JAVASCRIPT
C
Azure
Search This Blog
Sunday, 31 July 2016
How to find the string length using javascript?
Html page:
<
p
id
="P7"></
p
>
Javascript page:
<
script
>
var
txt =
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
;
document.getElementById(
"demo"
).innerHTML = txt.length;
</
script
>
Output:
26
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment