日期:2014-05-16  浏览次数:20346 次

常用JS语句100多
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( "input ").value.toUpperCase();
7.JS中的值类型:String,Number,Boolean,Null,Object,Function
8.JS中的字符型转换成数值型:parseInt(),parseFloat()
9.JS中的数字转换成字符型:( " " 变量)