一、Window對象:全局對象,所有對象的頂級對象
1.1 常用屬性:document,frames,location,screen......
1.2 常用方法:alert(),close(),open()....
備注:由于window對象使用十分頻繁,又是其他對象的父對象,所以在使用Window對象的屬性和方法時,JS允許省略Window對象的名稱。
即:window.alert("");等效于alert("")
例:window.open("abc.html","abc","width=333,height=343,top=90,left=23");打開網頁abc.html,命名為abc。
二、String對象2.1 常用屬性:string.length
2.2 常用方法:indexOf(),substr(),substring(),replace(),split()
三、Date對象dateObj=new Date();
dateObj=new Date(dateValue);
dateObj=new Date(year,month,date.....);
常用方法:getFullYear();getMonth();getDate();getDay();getHours();
新聞熱點
疑難解答