摘要:
document.selection.type.toLowerCase()=="none"是什么意思document代表文档selection代表选择项type代表选择想类型tolowerCase()为转换为小写字母 阅读全文
posted @ 2012-12-27 11:40
yunchong1019
阅读(143)
评论(0)
推荐(0)
摘要:
在js里用到数组是经常出现的,如:多个名字相同的input, 若是动态生成的, 提交时就需要判断其是否是数组. if(document.mylist.length != "undefined" ) {} 这个用法有误. 正确的是 if( typeof(document.mylist.length) != "undefined" ) {} 或 if( !isNaN(document.mylist.length) ) {} typeof的运算数未定义,返回的就是 "undefined". 运算数为数字 typeof(x) = " 阅读全文
posted @ 2012-12-27 11:37
yunchong1019
阅读(179)
评论(0)
推荐(0)