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

Yehuda Shiran, Ph.D.
Doc JavaScript

Developer News
Microsoft Shows Off Silverlight 4, IE9 Plans
Metasploit Expands Vulnerability Test Framework
HyperCard Reborn?

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, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs

webref The latest from WebReference.com Browse >
Rolling Out Your Own HTML Application Version Control · HTML 5: Client-side Storage · Working with Ajax Server Extensions
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Wi-Fi Product Watch, November 2009 · Chip Market Recovering From '08 Collapse · Low-Cost Tools to Kickstart Your New Business