摘要: JavaScript中的prototype详解http://blog.csdn.net/chaojie2009/article/details/6719353 阅读全文
posted @ 2012-07-25 14:48 Lorence Zhang 阅读(75) 评论(0) 推荐(0) 编辑
摘要: 1.document.write(""); 输出语句2.JS中的注释为//3.传统的HTML文档顺序是:document->html->(head,body)4.一个浏览器窗口中的DOM顺序是:window->(navigator,screen,history,location,document)5.得到表单中元素的名称和值:document.getElementById("表单中元素的ID号").name(或&#118alue)6.一个小写转大写的&#106s: document.getElementById("output 阅读全文
posted @ 2012-07-25 11:35 Lorence Zhang 阅读(192) 评论(0) 推荐(0) 编辑
摘要: JavaScript中的"", null, unbdefined,NaN,false 为false,其它为true1 if ("" || null || undefined || NaN || false) {2 alert(true);3 } else {4 alert(false); // 这句执行了5 }如果你还有其它的形式,请在评论中告知。谢谢! 阅读全文
posted @ 2012-07-25 10:58 Lorence Zhang 阅读(4220) 评论(0) 推荐(0) 编辑
摘要: 1 var v = 2; 2 switch (true) { 3 case 0: 4 alert("值为零"); 5 break; 6 case v > 0 && v <= 10: 7 alert("值在0 < v <= 10的范围"); 8 break; 9 case v > 10 && v <= 20:10 alert("值在10 < v <= 20的范围");11 break;12 default:13 alert("其它值"); 阅读全文
posted @ 2012-07-25 10:52 Lorence Zhang 阅读(693) 评论(0) 推荐(0) 编辑