随笔分类 -  JavaScript

摘要:CSS 控制:?<style>body{-moz-user-select:none;hutia:expression(this.onselectstart=function(){return(false)});}</style>JS 控制:?onselectstart="return false"; 阅读全文
posted @ 2011-12-07 23:53 one light
摘要:JS获取字符串长度(区分中英文) 中文算2个字,英文一个.?function getStrLength(str) { var cArr = str.match(/[^\x00-\xff]/ig); return str.length + (cArr == null ? 0 : cArr.length); } 阅读全文
posted @ 2011-12-07 23:46 one light
摘要:你可以使用这句代码读取jQuery的最新版本的代码文件。jquery官方的引用地址:示例:?1<script src="http://code.jquery.com/jquery-latest.js"></script>有效地址:?12http://code.jquery.com/jquery-1.4.1.min.jshttp://code.jquery.com/jquery-1.4.1.js其中:1.4.1是版本信息latest: 表示最新Google引用地址:可以使用下面这个代码从ajax.googleapis.com调用同样的最新版本jQuer 阅读全文
posted @ 2011-12-07 23:33 one light