spacer
Yehuda Shiran July 29, 2001
Computing the Comment's Length
Tips: July 2001

Yehuda Shiran, Ph.D.
Doc JavaScript

Developer News
News Flash: Adobe Has iPhone Workaround
Adobe's Flash 10.1 Goes Mobile (Minus iPhone)
A Salute to Visionary CEOs

Internet Explorer 6 can return the length of a comment. The following COMMENT element is embedded in this page without you noticing it of course:

<COMMENT ID="kuku"> This text will not appear in the browser window.</COMMENT>

The following link computes the length of the comment:

<A HREF="//" onclick="javascript:alert(document.all.kuku.length)">Compute Comment's Length</A>;

The length property is supported for comments only by Internet Explorer 6 and above. Click the following link and verify that the length is 49.

This text will not appear in the browser window. Compute Comment's Length;


People who read this tip also read these tips:

Look for similar tips by subject:

internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

Legal Notices, Licensing, Reprints, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs

webref The latest from WebReference.com Browse >
Building a Banking Application Home Page with OOP · Mixing Scripting Languages · Review: phpFox, a Social Networking CMS with all the Bells and Whistles
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Enterprise 2.0: Social Networking in the Cloud · BroadSoft Marketplace Hastens Pace of Telephony Innovation · Review: HTC Hero for Sprint