javascript常用單詞整理

來源:互聯網
上載者:User

標籤:typeof   code   曆史   get   number   break   variable   頭部   pre   

 javascript常用單詞整理

 

push :添加一個數組元素

document :文檔

pop :刪除最後一個數組元素

console :控制台

shift :刪除第一個數組元素

string :字串

Concat 組合數組

undefined :未定義

typeof :關鍵字

join:數組轉化為指定分隔字元

slice:返回指定數組

length:數組長度

Array:數組

number:數字

boolean:布爾

alert:提示框

parseInt:轉化為整型數值

continue:繼續

is NaN:非數字

sort:升序

break:截斷 跳出

reverse:倒序

object:物件類型

parseFloat:轉化為浮點值

index:索引

floor:向下取整

variable:變數

ceil:向上取整

round:四捨五入

abs:返回絕對值

eval:解析字串並運算

max:比較最大值

return:返回

min:比較最小值

addEventListener:事件名 函數

to.fixed:保留小數點

attachEvant:(on)事件名

random:隨機數

eletment:元素

onclick:按一下滑鼠事件

eventName:事件名

ondblclick:滑鼠雙擊事件

function:函數

onselect:內容被選中事件

removeEventListener:事件解除

onmouseover:滑鼠移入事件

detachEvent:刪除登入事件

onmouseout:滑鼠移出事件

open():彈出一個新視窗

onfocus:獲得焦時間點事件

function:函數(方法)

showModalDialog:彈出一個強制回應視窗

close():關閉當前視窗

onblur:失去焦時間點事件

onkeydown:鍵盤按下事件(前)

Date:日期對象

onkeyup:鍵盤鬆開事件

onkeypress:鍵盤按下事件(後)

getFullYear():年份

getMonth():月份(0--11)

getDate():幾號

getDay():星期幾(周一至周六)

getHours():小時(0--23)

getMinites():分鐘

getSeconds():秒數(0--59)

getMilliseconds():毫秒數

getTime():從1970至今的毫秒數

Date.now():從1970至今的毫秒值

tolocaleDatestring():輸出本地化的日期

setTimeout:延遲時間

tolocaleTimestring():輸出本地化得時間

clearTimeout:定時器對象

tolocalestring:輸出本地化的日期和時間

setInterval:間隔時間

clearInterval:停止

window.status:瀏覽器狀態列資訊

window.screen:螢幕資訊

screen.width:螢幕寬度

screen.height:螢幕高度

screen.availwidth:去掉工作列寬度

screen.avaiheight:去掉工作列高度

history:瀏覽歷程記錄

location:地址欄對象

onchange;內容改變事件

onkeydown;鍵盤按下事件(前)

onkeyup;鍵盤鬆開事件

onkeypress;鍵盤按下事件(後)

navigator:用於擷取使用者瀏覽器資訊

appCodeName:瀏覽器代碼名的字串表示

appName:返回瀏覽器的名稱

appVersion:返回瀏覽器的平台和版本資訊

platform:返回運行瀏覽器的作業系統平台

userAgent:返回由客戶機發送伺服器的

user-agent:頭部的值

Exception:異常 意外情況(try---catch)

onload:當頁面載入完成之後觸發

 

 

擷取元素對象方式:

getElementByld:

getElementsByName:

gatElementsByTagName:

getElementByClassName:

22:54:20

 

javascript常用單詞整理

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.