javascript溫習(xí)的一些筆記 基礎(chǔ)常用知識小結(jié)
更新時間:2011年06月22日 00:00:55 作者:
在電腦上找到多年前的javascript的一些小筆記,因為要將筆記本上面的文件整理一下, 不用的刪除掉, 所以將此篇筆記再發(fā)布一下,存檔到自己的博客吧, 電腦上的文件就刪除了
以下是全部內(nèi)容:
2010.11.29日
1.[window.]alert();
document.alinkColor
textString.anchor()
navigator.appCodeName
escape("Hi!") 返回ascii 碼
eval("x+y") 對字符串求值 x=10,y=20;eval=30
formName.elementName.focus(); 設(shè)置元素成為焦點
history.forward() 前進瀏覽器
Date相關(guān)的函數(shù)
Date.getDate() 返回 1-31間的日期
Date.getDay() 返回星期幾 周一到周六 0-6 間的數(shù)值
Date.getHours() 返回時 0-23
Date.getMinutes()
Date.getMonth()
Date.getSeconds()
Date.getTime() 得到時間截 從1970.1.1到現(xiàn)在的毫秒數(shù)
說明
{
}
Date.getTimezoneOffset() 得到客戶機的時差 GMT
Date.getYear();
history.go();
document.linkName.hash 返回Url中#后面的字符串, 相同的用法有document.links[0].hash,document.location.hash
document.history 對象
document.history.forward();
document.history.back();
document.history.go(-1), -2
location.host,linkName.host, linkName.port 返回主機名和端口
location.hostname
location.href
formName.selectName.options[index].index 返回一個選擇元素的下標
isNaN()檢測是否為數(shù)字
stringName.italics() 設(shè)置為XIE 體格式
stringName.lastIndexOf(‘o'); 返回一個字符在字符串串尾開始數(shù)的索引下標
stringName.link();
事件
onChange=""
onClick=""
onFocus=""
onLoad=""
onMouseOver=""
onSelect=""
onSubmit=""
onUnload="" 退出文檔的時候
document.open([MIMETYPE])
window.open("url","windows name"[,"windowFeatures"])
Date.parse("Jan 11,1996");
parseFloat(string)
parseInt(string[,radox]);
document.fromName.passwordName
location.pathname,link.pathname,links[index].pathname
windowName.prompt(message[inputDefault]);
protocal:
about,ftp,http,mailto,news,file,javascript
Math.random() 返回 0-1間的隨機數(shù)
Math.round(argument)四舍五入
formName.resetButtonName
window.status
stringName.strike() 將字符轉(zhuǎn)化成帶刪除線的字
stringNAme.sub() 將字符轉(zhuǎn)化成下標文本格式
formName.submit() 執(zhí)行與單擊提交按鈕相同的動作
stringName.substring(index1,index2) 取子串
stringName.sup() 轉(zhuǎn)換成上標形式
target 規(guī)定一個窗口名的字符串 formName.target, forms[index].target,location.target,link.target,links[index].target
document.title 返回<title> 標簽中的中讀值,沒包含的話是空NULL
Date.toGMTString() 將一個日期轉(zhuǎn)換在一個時間字符串
stringName.toLowerCase();
stringName.toUppderCase()
window.top, window,top.frameName,window.top.frames[index]最高層的瀏覽器窗口
navigator.userAgent 瀏覽器標識代理
documnet.vlinkColor 返回鏈接訪問過的顏色值
2010.11.29日
1.[window.]alert();
document.alinkColor
textString.anchor()
navigator.appCodeName
escape("Hi!") 返回ascii 碼
eval("x+y") 對字符串求值 x=10,y=20;eval=30
formName.elementName.focus(); 設(shè)置元素成為焦點
history.forward() 前進瀏覽器
Date相關(guān)的函數(shù)
Date.getDate() 返回 1-31間的日期
Date.getDay() 返回星期幾 周一到周六 0-6 間的數(shù)值
Date.getHours() 返回時 0-23
Date.getMinutes()
Date.getMonth()
Date.getSeconds()
Date.getTime() 得到時間截 從1970.1.1到現(xiàn)在的毫秒數(shù)
說明
{
}
Date.getTimezoneOffset() 得到客戶機的時差 GMT
Date.getYear();
history.go();
document.linkName.hash 返回Url中#后面的字符串, 相同的用法有document.links[0].hash,document.location.hash
document.history 對象
document.history.forward();
document.history.back();
document.history.go(-1), -2
location.host,linkName.host, linkName.port 返回主機名和端口
location.hostname
location.href
formName.selectName.options[index].index 返回一個選擇元素的下標
isNaN()檢測是否為數(shù)字
stringName.italics() 設(shè)置為XIE 體格式
stringName.lastIndexOf(‘o'); 返回一個字符在字符串串尾開始數(shù)的索引下標
stringName.link();
事件
onChange=""
onClick=""
onFocus=""
onLoad=""
onMouseOver=""
onSelect=""
onSubmit=""
onUnload="" 退出文檔的時候
document.open([MIMETYPE])
window.open("url","windows name"[,"windowFeatures"])
Date.parse("Jan 11,1996");
parseFloat(string)
parseInt(string[,radox]);
document.fromName.passwordName
location.pathname,link.pathname,links[index].pathname
windowName.prompt(message[inputDefault]);
protocal:
about,ftp,http,mailto,news,file,javascript
Math.random() 返回 0-1間的隨機數(shù)
Math.round(argument)四舍五入
formName.resetButtonName
window.status
stringName.strike() 將字符轉(zhuǎn)化成帶刪除線的字
stringNAme.sub() 將字符轉(zhuǎn)化成下標文本格式
formName.submit() 執(zhí)行與單擊提交按鈕相同的動作
stringName.substring(index1,index2) 取子串
stringName.sup() 轉(zhuǎn)換成上標形式
target 規(guī)定一個窗口名的字符串 formName.target, forms[index].target,location.target,link.target,links[index].target
document.title 返回<title> 標簽中的中讀值,沒包含的話是空NULL
Date.toGMTString() 將一個日期轉(zhuǎn)換在一個時間字符串
stringName.toLowerCase();
stringName.toUppderCase()
window.top, window,top.frameName,window.top.frames[index]最高層的瀏覽器窗口
navigator.userAgent 瀏覽器標識代理
documnet.vlinkColor 返回鏈接訪問過的顏色值
相關(guān)文章
js使用for循環(huán)查詢數(shù)組中是否存在某個值
IE8不支持indexOf,因此寫一個for循環(huán)來判斷是否存在,下面是代碼,經(jīng)測試還不錯2014-08-08微信小程序 數(shù)據(jù)緩存實現(xiàn)方法詳解
這篇文章主要介紹了微信小程序 數(shù)據(jù)緩存實現(xiàn)方法詳解,文中通過示例代碼介紹的非常詳細,對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友可以參考下2019-08-08bootstrap-table實現(xiàn)服務(wù)器分頁的示例 (spring 后臺)
本篇文章主要介紹了bootstrap-table實現(xiàn)服務(wù)器分頁的示例 (spring 后臺),具有一定的參考價值,有興趣的可以了解一下2017-09-09Bootstrap Table服務(wù)器分頁與在線編輯應(yīng)用總結(jié)
這篇文章主要介紹了Bootstrap Table服務(wù)器分頁與在線編輯應(yīng)用總結(jié) 的相關(guān)資料,非常不錯,具有參考借鑒價值,需要的朋友可以參考下2016-08-08JS組件庫AlloyTouch實現(xiàn)圖片輪播過程解析
這篇文章主要介紹了JS組件庫AlloyTouch實現(xiàn)圖片輪播組件過程解析,文中通過示例代碼介紹的非常詳細,對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友可以參考下2020-05-05