DIV CSS 佈局教程網

 DIV+CSS佈局教程網 >> 網頁腳本 >> JavaScript入門知識 >> 關於JavaScript >> javascript溫習的一些筆記 基礎常用知識小結
javascript溫習的一些筆記 基礎常用知識小結
編輯:關於JavaScript     
以下是全部內容:

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(); 設置元素成為焦點
history.forward() 前進浏覽器
Date相關的函數
Date.getDate() 返回 1-31間的日期
Date.getDay() 返回星期幾 周一到周六 0-6 間的數值
Date.getHours() 返回時 0-23
Date.getMinutes()
Date.getMonth()
Date.getSeconds()
Date.getTime() 得到時間截 從1970.1.1到現在的毫秒數
說明
{
}
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()檢測是否為數字
stringName.italics() 設置為XIE 體格式
stringName.lastIndexOf(‘o'); 返回一個字符在字符串串尾開始數的索引下標
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間的隨機數
Math.round(argument)四捨五入
formName.resetButtonName

window.status
stringName.strike() 將字符轉化成帶刪除線的字
stringNAme.sub() 將字符轉化成下標文本格式
formName.submit() 執行與單擊提交按鈕相同的動作
stringName.substring(index1,index2) 取子串
stringName.sup() 轉換成上標形式
target 規定一個窗口名的字符串 formName.target, forms[index].target,location.target,link.target,links[index].target

document.title 返回<title> 標簽中的中讀值,沒包含的話是空NULL

Date.toGMTString() 將一個日期轉換在一個時間字符串

stringName.toLowerCase();
stringName.toUppderCase()

window.top, window,top.frameName,window.top.frames[index]最高層的浏覽器窗口

navigator.userAgent 浏覽器標識代理
documnet.vlinkColor 返回鏈接訪問過的顏色值
XML學習教程| jQuery入門知識| AJAX入門| Dreamweaver教程| Fireworks入門知識| SEO技巧| SEO優化集錦|
Copyright © DIV+CSS佈局教程網 All Rights Reserved