Đang chuẩn bị liên kết để tải về tài liệu:
JavaScript Bible, Gold Edition part 86

Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ

JavaScript Bible, Gold Edition part 86. This book will bring programmers and non-technical professionals, including casual programmers and scripters, painlessly up to speed on all aspects of mastering JavaScript. Key topics include programming fundamentals, JavaScript language elements and how to use them effectively, and how to easily and efficiently add powerful new functionality to HTML documents and Java applets. | 698 Part III Document Objects Reference how JavaScript and VBScript can interact so that JavaScript code can branch based on the availability of DRM HEAD OBJECT ID drmObj HEIGHT 1 WIDTH 1 CLASSID CLSID 760C4B83-E211-11D2-BF3E-00805FBE84A6 OBJECT SCRIPT LANGUAGE VBScript function hasDRM on error resume next drmObj.StoreLicense if err.number 0 then hasDRM true else hasDRM false end if end function SCRIPT SCRIPT LANGUAGE JavaScript var gHasDRM if drmObj hasDRM gHasDRM true else gHasDRM false SCRIPT HEAD The JavaScript segment sets a Boolean global variable to indicate whether the object has loaded correctly. Part of the job is accomplished via the hasDRM function in the VBScript segment. From VBScript the drmObj object responds to the StoreLicense method call but it throws a VBScript error indicating that no parameter was sent along with the method. Any subsequent scripts in this page can use the gHasDRM global variable as a conditional expression before performing any actions requiring the object which works in tandem with the Windows Media Player . screen Object Properties Methods Event Handlers availHeight availLeft availTop availwidth bufferDepth colorDepth fontSmoothingEnabled height screen Chapter 28 The Navigator and Other Environment Objects 699 Properties Methods Event Handlers pixelDepth updateinterval width Syntax Accessing screen object properties All screen.property IE4 NN6 window. navigator.screen.property NN2 NN3 NN4 NN6 IE3 J1 IE3 J2 IE4 IE5 IE5.5 Compatibility About this object Browsers other than from the earliest generations provide a screen object that lets your scripts inquire about the size and color settings of the video monitor used to display a page. Properties are carefully designed to reveal not only the raw width and height of the monitor in pixels but also what the available width and height are once you take into account the operating system s screen-hogging interface elements for example the Windows taskbar and the Mac menu bar . You can