ZLTools ![GitHub](https://camo.githubusercontent.com/bbe15025706119ce9cb503929e24d5f9a3752581ceb88d1b5e184385767576dc/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f4c616e675a6861692f5a4c546f6f6c73)
这是啥
一款轻量级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>