一些很有用的小插件

生成加载的图片

loading 样式图标可以从网站定制: loading 样式图标可以从网站定制: https://loading.io/
在这里插入图片描述
很多免费的,基本都可以满足需求。
loading设置一个遮盖层

#loading {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.7);
	z-index: 15000;
}
 
#loading img {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 80px;
	height: 80px;
	margin-top: -15px;
	margin-left: -15px;
}
<div id="loading">
    <img src="images/loading.gif">
</div>
$('#loading').hide();
$('#loading').show();
//点击查询按钮重新显示loading
function search() {
	$('#loading').show();
        $.ajax({
			url : "xxx",
			type : 'POST',
			success : function(data) {
				//成功后 隐藏loading框,
				$('#loading').hide();
                                      //to do something
			},
}

kingEditer编辑器

下载地址:http://kindeditor.net/down.php
那天,我始终没在官方给下载出来,后来还是去https://www.onlinedown.net/soft/88407.htm下载的

简单使用步骤:

<textarea name="content" id="content"></textarea>
 
<script src="/static/jquery-1.12.4.js"></script>
<script src="/static/plugins/kind-editor/kindeditor-all.js"></script>
<script>
    $(function () {
        initKindEditor();
    });
 
    function initKindEditor() {
        var kind = KindEditor.create('#content', {
        	resize: 0,           //禁止文本框横向和纵向拉伸
            width: '100%',       // 文本框宽度(可以百分比或像素)
            height: '300px',     // 文本框高度(只能像素)
            minWidth: 200,       // 最小宽度(数字)
            minHeight: 400      // 最小高度(数字)
        });
    }
</script>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值