The uniqueID Property


The uniqueID Property

In the Internet Explorer, you can create unique ID values to assign to elements using the uniqueID property, and that can be useful when you're creating new elements (as discussed in Chapter 16). You can find the support for this property in Table 5.60.

Table 5.60. The uniqueID Property

Property

NS2

NS3

NS4

NS6

IE3a

IE3b

IE4

IE5

IE5.5

IE6

uniqueID

             

x

x

x

 

Read-only

 

Type: String

Here's an example that creates a new ID for a header and displays that ID (typically, unique IDs are values, such as "ms__id18" and so forth):

 <HTML>      <HEAD>          <TITLE>              Using the uniqueID Property          </TITLE>      </HEAD>       <BODY>          <H1 ID="Header">Using the uniqueID Property</H1>          <SCRIPT LANGUAGE = "JavaScript">              <!--             alert(Header.uniqueID)              // -->          </SCRIPT>      </BODY>  </HTML> 

And that's itwe've covered the core HTML properties. As you can see, there's a tremendous amount of JavaScript power here; and when working in future chapters, you'll be able to find the definition of any property marked as "core" in this chapter. Let's push aheadin the next chapter, I'll take a look at the core HTML methods and events.



Inside Javascript
Inside JavaScript
ISBN: 0735712859
EAN: 2147483647
Year: 2005
Pages: 492
Authors: Steve Holzner

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net