摘要: 每一項都是js中的小技巧,但十分的實用!
1.document.write(""); 輸出語句
2.JS中的注釋為//
3.傳統的HTML文檔順序是:document->html->(head,body)
4.一個瀏覽器窗口中的DOM順序是:window->(navigator,screen,history,location,document)
5.得到表單中元素的名稱和值:document.getElementById("表單中元素的ID號").name(或value)
6.一個小寫轉大寫的JS: document.getElementById("output").value = document.getElementById("i
nput").value.toUpperCase();
7.JS中的值類型:String,Number,Boolean,Null,Object,Function
8.JS中的字符型轉換成數值型:parseInt(),parseFloat()
閱讀全文