內建函式


資料轉換

parseFloat(資料)將資料轉換為浮點數
parseInt(資料)將資料轉換為整數

將資料視為陳述式來執行

eval('字串')將字串視為程式來執行

檢查資料的有效性

isFinite(資料)檢查資料是否為有效範圍內的值
isNaN(資料)檢查資料是否非數值

網址格式的轉換

decodeURI('網址')解碼 encodeURI() 的格式為 URI 網址
dncodeURIComponent('網址')解碼 encodeURIComponent() 的格式為 URI 網址
encodeURI('網址')將 URI 網址編碼為 UTF-8 格式
encodeURIComponent('網址')將 URI 網址更嚴格地編碼為 UTF-8 格式