JavaScript的几种对象
JavaScript由ECMAScript(基本语法),BOM和DOM组成,下面是对JS中一些对象的总结。 <o:p></o:p>
一.BOM<o:p></o:p>
BOM指(Brower Object Model)浏览器对象模型。<o:p></o:p>
从BOM的角度看,侧重于从集合的角度看问题,把页面划分为不同的部分,以及页面本身的一些属性,如背景色,标题名称等,由于BOM的实现是基于浏览器的,所以不同浏览器的属性和方法有不一致之处,这造成很多麻烦。注意一些一致的,常用的属性和方法,BOM把页面分为如下几部分:<o:p></o:p>
anchors : Collection of all anchors in the page(represented by <v:shapetype id="_x0000_t75" stroked="f" filled="f" path="m@4@5l@4@11@9@11@9@5xe" o:preferrelative="t" o:spt="75" coordsize="21600,21600"><v:stroke joinstyle="miter"></v:stroke><v:formulas><v:f eqn="if lineDrawn pixelLineWidth 0"></v:f><v:f eqn="sum @0 1 0"></v:f><v:f eqn="sum 0 0 @1"></v:f><v:f eqn="prod @2 1 2"></v:f><v:f eqn="prod @3 21600 pixelWidth"></v:f><v:f eqn="prod @3 21600 pixelHeight"></v:f><v:f eqn="sum @0 0 1"></v:f><v:f eqn="prod @6 1 2"></v:f><v:f eqn="prod @7 21600 pixelWidth"></v:f><v:f eqn="sum @8 21600 0"></v:f><v:f eqn="prod @7 21600 pixelHeight"></v:f><v:f eqn="sum @10 21600 0"></v:f></v:formulas><v:path o:connecttype="rect" gradientshapeok="t" o:extrusionok="f"></v:path><o:lock aspectratio="t" v:ext="edit"></o:lock></v:shapetype><v:shape id="_x0000_i1025" style="WIDTH: 0.75pt; HEIGHT: 0.75pt" alt="" type="#_x0000_t75"><v:imagedata o:href="http://ltc603.iteye.com/javascripts/fckeditor/editor/images/spacer.gif" src="file:///C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\msohtml1\01\clip_image001.gif"></v:imagedata></v:shape>)<o:p></o:p>
applets : Collection of all applets in the page<o:p></o:p>
forms : Collection od all embeded objects in the page(represented by the tag)<o:p></o:p>
images : Collection of all forms in the page<o:p></o:p>
links : Collection of all links in the page (represented by )<o:p></o:p>