# tip
**Repository Path**: luodan/tip
## Basic Information
- **Project Name**: tip
- **Description**: 提示插件
- **Primary Language**: JavaScript
- **License**: Not specified
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2015-03-05
- **Last Updated**: 2020-12-19
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
#tip
##使用方法:
###1.在项目中引入tip.js文件
###2.在要显示提示的页面,写入:
```html
```
###3.在js文件中,执行tip.on(message,id,time);即可显示该提示,执行tip.off(message,id);即可关闭该提示。
####message参数为:提示内容
####id参数为:提示类型(1为正常提示——提示框为蓝色,0为错误提示——提示框为红色)
####time参数为:提示显示时间(如果未写该参数,则默认该提示显示15s后自动关闭)
####message和id参数为必写,time参数可以不写
```javascript
//例如:
tip.on('数据加载中...',1); //15秒后自动关闭该提示
tip.on('登陆成功',1,5000); //5秒后自动关闭该提示
tip.on('登陆失败',0,5000); //5秒后自动关闭该提示
tip.off('数据加载中...',1); //关闭该提示——'数据加载中...'
```
###4.关闭所有正常提示,关闭所有错误提示:
```javascript
tip.off('',1); //关闭所有正常提示
tip.off('',0); //关闭所有错误提示
```