一款轻量级JavaScript工具集。
- params —— 请求参数处理
- Object.extend —— 对象拷贝
- Object.getVal —— 多级对象属性获取
- Object.setVal —— 多级对象属性赋值
- Object.encodeEntity —— 字符实体编码
- Object.decodeEntity —— 字符实体解码
- Math.round2 —— 小数四舍五入
- String.prototype.replaceAll —— 字符串替换所有 (引用自网络)
- ZLTools.prototype.serializeObject —— 表单序列化
- ZLTools.prototype.anchor —— 锚点绑定
- ZLTools.prototype.boxCut —— 多行文字截断
引入JS:
<!DOCTYPE HTML>
<html>
<head>
<title>ZLTools by LangZhai(智能小菜菜)</title>
</head>
<body>
<!--为了使页面加载更快,最好将JS放置在<body>的末尾-->
<script src="zltools.min.js"></script>
</body>
</html>