Appendix A_ Netscape Navigator Object Road Map and Compatibility Guide

Chia sẻ: Nguyễn Thị Tú Uyên | Ngày: | Loại File: PDF | Số trang:5

0
87
lượt xem
4
download

Appendix A_ Netscape Navigator Object Road Map and Compatibility Guide

Mô tả tài liệu
  Download Vui lòng tải xuống để xem tài liệu đầy đủ

The following pages contain the text of a handy pamphlet whose Adobe Acrobat (.pdf ) file you’ll find on the companion CD-ROM. The arrangement of the following material has been modified for printing in this appendix. The .pdf file on the CD-ROM, which you can print it out for quick reference, offers a more compact arrangement. With this compact guide, you can see at a glance the breadth of each object’s properties, methods, and event handlers. You can also see which language’s words are compatible with each scriptable browser through the level 4 browsers. For instructions on printing and assembling this pamphlet, see the howtoprt.txt readme file on the CD-ROM....

Chủ đề:
Lưu

Nội dung Text: Appendix A_ Netscape Navigator Object Road Map and Compatibility Guide

  1. Netscape Navigator Object A A P P E N D I X Road Map and 3 3 3 3 Compatibility Guide T he following pages contain the text of a handy pamphlet whose Adobe Acrobat (.pdf ) file you’ll find on the companion CD-ROM. The arrangement of the following material has been modified for printing in this appendix. The .pdf file on the CD-ROM, which you can print it out for quick reference, offers a more compact arrangement. With this compact guide, you can see at a glance the breadth of each object’s properties, methods, and event handlers. You can also see which language’s words are compatible with each scriptable browser through the level 4 browsers. For instructions on printing and assembling this pamphlet, see the howtoprt.txt readme file on the CD-ROM.
  2. 946 Copyright © 1998 by Danny Goodman Netscape Navigator 4 Object Road Map Part V 3 Appendixes window window frame self top parent closedN3,M4 alert(“msg”) onBlur=N3,M4 defaultStatus back( )N4 onDragDrop=N4,(S) history document location toolbar, etc. document blur( )N3,M4 onFocus=N3,M4 frames[i] captureEvents(type)N4 onLoad= link anchor layer form applet image area history clearInterval(ID)N4,M4 onMove=N4 innerHeightN4,(S) clearTimeout(ID) onResize=N4,M4 text radio button fileUpload select innerWidthN4,(S) close( ) onUnload= location confirm(“msg”) textarea checkbox reset option locationbarN4,(S) disableExternalCapture()N4,(S) menubarN4,(S) enableExternalCapture()N4,(S) password submit name find([“str”][,case, bkwd])N4 onerrorN3,M4 focus( )N3,M4 openerN3,M3 forward( )N4 Netscape Navigator 4 Document Object Model Containment Hierarchy outerHeightN4,(S) handleEvent(event)N4 outerWidthN4,(S) home( )N4 pageXOffsetN4 moveBy(∆x,∆y)N4,(S) document layerN4 pageYOffsetN4 moveTo(x,y)N4,(S) alinkColor captureEvents(type)N4 (None) above load(“filename”,y) onBlur= parent open(URL,”name”,”specs”)(1),(S) anchors[i] clear( ) background moveAbove(layerObj) onFocus= personalbarN4,(S) print( )N4, applets[i]N3,M4 close( ) below moveBelow(layerObj) onLoad= scrollbarsN4,(S) prompt(“msg”,”reply”) bgColor getSelection( )N4,(2) bgColor moveBy(∆x, ∆y) onMouseOut= self releaseEvents(type)N4 cookie handleEvent(event)N4 clip.top moveTo(x, y) onMouseOver= status resizeBy(∆x,∆y)N4,(S) domainN3,M4 open(“mimetype” [,replace])(3) clip.left moveToAbsolute(x, y) onMouseUp= statusbarN4,(S) resizeTo(width,height)N4,(S) embeds[i]N3,M4 releaseEvents(type)N4 clip.right resizeBy(∆x, ∆y) toolbarN4,(S) routeEvent(event)N4 fgColor routeEvent(event)N4 clip.bottom resizeTo(width, height) top scroll(x,y)N3,M4 forms[i] write(“string”) clip.width window scrollBy(∆x,∆y)N4 images[i]N3,M4 writeln(“string”) clip.height scrollTo(x,y)N4 lastModified document setInterval(func, msec [,args])N4,M4,(2) layers[i]N4 left setTimeout(func, msec [,args])N4,M4,(3) linkColor name stop( )N4 links[i] pageX (1)New window specs for all browsers: height, width, toolbar, location, directories, location(1) pageY status, menubar, scrollbars, resizable, copyhistory. Additional specs for Navigator 4: referrer parentLayer alwaysLowered(S), alwaysRaised(S), dependent, hotkeys, innerHeight, innerWidth, outerHeight, outerWidth, screenX, screenY, titlebar(S), z-lock(S). title siblingAbove (2)Optional args parameter added to N4; 3rd parameter in M4 is for scripting language. URLN3,M4 siblingBelow (3)Third parameter in N4 for args; in M4 for scripting language. vlinkColor src (1)Replaced top by the URL property in Navigator 3. locationbarN4, menubarN4, personalbarN4, (2)M4 has a document.selection property to retrieve the currently selected text. visibility scrollbarsN4, statusbarN4, toolbarN4 (3)mimetype parameter new in M4, but only "text/html" type supported. zIndex visible (None) (None) location How to Use This Map The hierarchy diagram shows the relationships history hash assign(“URL”) (None) among various HTML-generated objects in Netscape host reload([unconditional])N3,M4 length back( ) (None) Navigator 4. Follow the dark lines to create references hostname replace(“URL”)N3,M4 current(S),(1) forward( ) to objects: href next(S),(1) go(int | “URL”) window.document.formName.textName.value pathname previous(S),(1) The three columns in the individual object listings port show the properties, methods, and event handlers for (1)Introduced in Navigator 3.0 for use with a trial security method no longer in use. protocol the object. Available in Navigator 4 with signed scripts. search
  3. Netscape Navigator 4 Object Road Map imageN3,(1),M4 link ( ) areaN3,M4 border (None) onAbort= hash (None) onClick= hash (None) onClick=N4 complete onError= host onDblClick=N4,(1),M4 host onMouseOut= height onLoad= hostname onMouseDown=N4,M4 hostname onMouseOver= hspace href onMouseOut=N3,M4 href lowsrc pathname onMouseOver= pathname name port onMouseUp=N4,M4 port src protocol protocol vspace search search width target target xN4 textN4 yN4 xN4 yN4 appletN3,M3 (1)Implemented in MSIE 3 for Macintosh, but not Windows. (1)Not (Java vars) (Java methods) (None) implemented for Macintosh Navigator 4. Browser Compatibility Guide This map is a Netscape-centric view of JavaScript. No anchor ( ) JavaScript Levels items unique to Microsoft Internet Explorer ( MSIE) are JavaScript has gone through three versions. The nameN4,M4 (None) (None) following browsers support features from the listed, but Netscape-only items are. Items that have no textN4 corresponding JavaScript level: superscript notation are available to all JavaScript- xN4 Browser JavaScript Level enabled browsers, including Navigator 2 and MSIE 3. yN4 Netscape Navigator 2.0x 1.0 Superscript notations are keyed as follows: N3 — New in Netscape 3 MS Internet Explorer 3.0x 1.0 N4 — New in Netscape Navigator 4 form Netscape Navigator 3.0x 1.1 M3 — New in Netscape 3 and MSIE 3 action handleEvent(evt)N4 onReset=N3,M4 Netscape Navigator 4.0x 1.2 M4 — New in MSIE 4 elements[i] reset()N3,M4 onSubmit= MS Internet Explorer 4.0x 1.2 J2 — New in MSIE 3, JScript.dll Version 2 encoding submit() length No other mainstream browsers support JavaScript. (S) — Requires Netscape Navigator 4 Signed Scripts method If an item shows N3 or N4 but not M3 or M4, it means name that the feature is Netscape-only, and is not available in target radio MSIE. checked click( ) onClick= text, textarea, password, hidden defaultChecked handleEvent(evt)N4 onMouseDown=N4,M4 select length onMouseUp=N4,M4 defaultValue blur( ) onBlur= name length blur( )N3,M4 onBlur= form focus( ) onChange= typeN3,M4 name focus( )N3,M4 onChange= name handleEvent(event)N4 onFocus= value options[i] handleEvent(evt)N4 onFocus= typeN3,M4 select( ) onKeyDown=N4,M4 options[i].defaultSelected value(1) onKeyPress=N4,M4 options[i].index onKeyUp=N4,M4 options[i].selected fileUploadN3,M4,(1) onSelect= options[i].text options[i].value (1)Password value returns empty string in Navigator 2. name blur( ) onBlur= selectedIndex value focus( ) onFocus= typeN3,M4 handleEvent(evt)N4 onSelect= checkbox select( ) checked click() onClick= button, reset, submit (1)IE4does not use Netscape's "fileUpload" terminology, but both objects refer to defaultChecked handleEvent(evt)N4 onMouseDown=N4,M4 Copyright © 1998 by Danny Goodman the same kind of tag. Appendix A 3 Netscape Navigator Object Road Map and Compatibility Guide name click( ) onClick= name onMouseUp=N4,M4 typeN3,M4 handleEvent(evt)N4 onMouseDown=N4,M4 typeN3,M4 value onMouseUp=N4,M4 value 947
  4. 948 Copyright © 1998 by Danny Goodman Netscape Navigator 4 Global Objects Math String navigator(1) EventN4 Part V 3 Appendixes E abs(val) length anchor(“anchorName”) appCodeName javaEnabled( )N3,M4 ALT_MASK (None) LN2 acos(val) prototypeN3 big( ) appName preference(name[,val])N4,(S),(2) CONTROL_MASK LN10 asin(val) blink( ) SHIFT_MASK appVersion taintEnabled( )N3,M4 bold( ) META_MASK LOG2E atan(val) languageN4 charAt(index) MOUSEDOWN LOG10E atan2(val1, val2) charCodeAt([i])N4,M4 mimeTypes[i]N3 MOUSEUP PI ceil(val) concat(string2)N4,M4 platformN4 MOUSEOVER SQRT1_2 cos(val) fixed( ) plugins[i]N3 MOUSEOUT SQRT2 exp(val) fontcolor(#rrggbb) userAgent MOUSEMOVE floor(val) fontsize(1to7) MOUSEDRAG log(val) fromCharCode(n1...)N4,M4 (1)Contained by window object in M4 CLICK indexOf(“str” [,i]) (2)Preference names: general.always_load_images; security.enable_java; DBLCLICK max(val1, val2) javascript.enabled; browser.enable_style_sheets; autoupdate.enabled; italics( ) KEYDOWN min(val1, val2) lastIndexOf(“str” [,i]) network.cookie.cookieBehavior; network.cookie.warnAboutCookies KEYUP pow(val1, power) link(URL) KEYPRESS random() match(regexp)N4,M4 DRAGDROP round(val) replace(regexp,str)N4,M4 FOCUS sin(val) search(regexp)N4,M4 BLUR slice(i,j)N4,J2 pluginN3 mimeTypeN3 SELECT sqrt(val) small( ) description refresh( ) CHANGE tan(val) description (None) split(char)N3,(1),M4 RESET filename enabledPlugin strike( ) SUBMIT sub( ) length type Date SCROLL substr(start,length)N4,M4 name suffixes LOAD prototypeN3 get/set[UTC]Date() substring(intA, intB) UNLOAD get/set[UTC]Day() sup( ) XFER_DONE get/set[UTC]Hours() toLowerCase( ) functionN3,J2 ABORT get/set[UTC]Minutes() toUpperCase( ) ERROR arguments[ ] (None) LOCATE get/set[UTC]Month() (1)Added behavior in N4 includes: ability to accept a regexp arityN4 MOVE get/set[UTC]Seconds() parameter; second parameter (limit integer) to limit the caller RESIZE number of splits to be included; a space string parameter get/set[UTC]Time() signifying any white space character. prototype FORWARD get/set[Full]Year() HELP getTimezoneOffset() BACK parse(“dateString”) ArrayN3,J2 RegExpN4,M4 toGMTString() lengthJ2 concat(array2)N4,M4 input (None) toLocaleString() prototypeN3,J2 join(“char”)J2 multiline toString() push( )N4 lastMatch eventN4 UTC(date vals) pop( )N4 lastParen data(1) (None) [UTC] and [Full] add-ons available in N4,M4. reverse( )J2 leftContext layerX shift( )N4 rightContext layerY slice(i,[j])N4,M4 $1...$9 screenN4,M4,(1) modifiers(2) sort(compareFunc)J2 pageX availHeight (None) unshift( )N4 Regular ExpressionN4,M4 pageY availLeft(2) screenX availTop(2) global compile(regexp) NumberN3,J2 screenY availWidth ignoreCase exec(“string”)(1) target colorDepth MAX_VALUE toString( ) lastIndex test(“string”) type height MIN_VALUE source str.match(regexp)(1) which(3) width NaN str.replace(regexp,str)(1) pixelDepth(2) NEGATIVE_INFINITY str.search(regexp) (1)URL of dragdrop event (2)Event.ALT_MASK, POSITIVE_INFINITY str.split(regexp[,limit] Event.CONTROL_MASK, (1)Contained by window object in M4 Event.SHIFT_MASK, Event.META_MASK (2)Not in M4 prototype (1)Returns an array with properties: index, input, [0], [1]...[n] (3)Mouse button (1=left; 3=right); Key char code
  5. Appendix A 3 Netscape Navigator Object Road Map and Compatibility Guide 949 Operators Control Statements Comparison if (condition) { == Equals statementsIfTrue != Does not equal } > Is greater than >= Is greater than or equal to if (condition) { < Is less than statementsIfTrue = Zero fill by value do { &= Bitwise AND by value statements |= Bitwise OR by value } while (condition)N4,M4 ^= Bitwise XOR by value switch (expression) { Boolean case label1 : && AND statements || OR [break] ! NOT case label2 : statements Bitwise [break] & Bitwise AND | Bitwise OR ... ^ Bitwise XOR ~ Bitwise NOT [default : statements] > Right shift >>> Zero fill right shift label : N4,M4 Miscellaneous continue [label] N4,M4 deleteN4,M4 Property destroyer break [label] N4,M4 new Object creator this Object self-reference typeofN3,M3 Value type voidN3,M3 Return no value Global Functions escape(“str” [,1]) eval(expression) unescape(“str”) isNaN(expression) Functions of All Objects Boolean(value)N4 parseFloat(“string”) watch(id, handler)N4 toString() Number(“str”)N4 parseInt(“string”) unwatch(id)N4 String(value)N4 Copyright © 1998 by Danny Goodman
Đồng bộ tài khoản