close
java script

srcElement:回傳觸發事件的元素

setInterval("funtion",時間1000為一秒)

document.write("welcome<"br/>") 將文字寫入網頁之中

window.alert(" ")顯示警告文字
name=window.prompt("視窗上顯示的字(提示)","視窗一開始出現的字(輸入)") ;把輸入的直設成name




invert filter:底片效果 The invert filter applies a negative image effect.


mask filter:It is used to create images with transparent foregrounds(透明前景)


xray : x光效果 The xray uses methods gray and invert filter to achieve its effects.


The shadow filter property can be set to exactly 8 different values: 0 45 90 135 180 225 270 315


blendTrans:淡入淺出效果 They enable portions of pages and entire pages to be faded in an out.可設定維持幾秒



物件

string
string.split(token) ;token分開
string.anchor(" ") ;設定茅點
ex
document.write("設定茅點".anchor("test1"))

<"a href="#test1">



string.strike() ;加刪除線



string.fixed() ;把字串設成等寬字形



array


join(把元素轉成字串)



event


取得事件發生的位置


event.type 種類


event.screenX/Y 螢幕x/y的值





form



性質(property)


document是物件 同時也是window的性質


window->document


num=parseInt(firstnum)


navigator.appName/version 回傳瀏覽器名稱/版本


大小寫有差

變數宣告


var 變數名稱=起始值



事件觸發

事件觸發可以有一項以上 用分號分開即可
br /> onload:再網頁依開啟就觸發

onunload:連結到下一個網頁時觸發


onmouseover/onmousemove:用在超連結時滑鼠點到圖案 圖案做改變

<"a href=" " onmouseover=" " onmousemove=" "><"/a>

onlick:按滑鼠鍵時觸發




時間函式

now=new Date()


hour=now.getHours() ;0~23
arrow
arrow
    全站熱搜

    a22710518 發表在 痞客邦 留言(0) 人氣()