Name

CODE — NN n/a IE 4 HTML n/a

Synopsis

CODE=”fileName.class"

Optional

The CODE attribute is likely an interim solution in Internet Explorer that allows the OBJECT element to perform the same job as an APPLET element, using the same kind of attributes. The CODE attribute value is the name of the Java applet class file. If the class file is in a directory other than the document, the path to the directory must be assigned to the CODEBASE attribute, just like in the APPLET element. Eventually, the CODE attribute may be supplanted by the HTML 4.0 CLASSID attribute, which is intended for all object implementations. Parameters are passed to applets via PARAM elements, just like the ones nested inside APPLET elements.

Example

<OBJECT CODE="fileReader.class" CODEBASE="classes"></OBJECT>

Value

Applet class filename.

Default

None.

Object Model Reference

IE

[window.]document.elementID.code

Get Dynamic HTML: The Definitive Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.