1 Star 0 Fork 47

北方糙汉子 / Light Year Admin Using Iframe v5

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
lyear_js_maxlength.html 4.98 KB
一键复制 编辑 原始数据 按行查看 历史
笔下光年 提交于 2022-11-01 21:00 . 提交代码
<!DOCTYPE html>
<html lang="zh">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimal-ui">
<meta name="keywords" content="LightYear,LightYearAdmin,光年,后台模板,后台管理系统,光年HTML模板">
<meta name="description" content="Light Year Admin V5是一个基于Bootstrap v5.1.3的后台管理系统的HTML模板。">
<title>长度判断 - 光年(Light Year Admin V5)后台管理系统模板</title>
<link rel="shortcut icon" type="image/x-icon" href="favicon.ico">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-touch-fullscreen" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="default">
<link rel="stylesheet" type="text/css" href="css/materialdesignicons.min.css">
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="css/style.min.css">
</head>
<body>
<div class="container-fluid">
<div class="row">
<div class="col-lg-12">
<div class="card">
<header class="card-header"><div class="card-title">长度判断</div></header>
<div class="card-body">
<p>插件使用bootstrap-maxlength 1.9.1,github地址:<a href="http://mimo84.github.io/bootstrap-maxlength/" target="_blank">http://mimo84.github.io/bootstrap-maxlength/</a></p>
<div class="mb-3">
<label for="defaultconfig">默认</label>
<p class="text-muted">默认当剩余字符小于等于10时,提示将显示:</p>
<input type="text" class="form-control" maxlength="25" name="defaultconfig" id="defaultconfig">
</div>
<div class="mb-3">
<label for="thresholdconfig">阈值</label>
<p class="text-muted">使用<code>threshold</code>选项表示还有多少字符可以开始显示指示。</p>
<input type="text" maxlength="25" name="thresholdconfig" class="form-control" id="thresholdconfig">
</div>
<div class="mb-3">
<label for="placement">位置</label>
<p class="text-muted">您所需要做的就是用其中一个字符串指定<code>placement</code>选项。如果未指定,则将被定位到“底部”。</p>
<input type="text" class="form-control" maxlength="25" name="placement" id="placement">
</div>
<div class="mb-3">
<label for="alloptions">始终显示</label>
<p class="text-muted mb-3 font-13">如果<code>showOnReady</code>为true,则在指示器就绪时始终显示。默认值:false。</p>
<input type="text" class="form-control" maxlength="25" name="alloptions" id="alloptions">
</div>
<div class="mb-3">
<label for="mb-2">文本域</label>
<p class="textarea">Bootstrap maxlength 支持文本区域和输入。即使在旧的IE上。</p>
<textarea id="textarea" class="form-control" maxlength="225" rows="3" placeholder="此文本区域限制为225个字符。"></textarea>
</div>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/popper.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
<!--引入长度验证插件js-->
<script type="text/javascript" src="js/bootstrap-maxlength/bootstrap-maxlength.min.js"></script>
<script type="text/javascript" src="js/main.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
// 默认使用
$("input#defaultconfig").maxlength({
warningClass: "badge bg-info",
limitReachedClass: "badge bg-warning"
});
// 设置阈值
$("input#thresholdconfig").maxlength({
threshold: 20,
alwaysShow: false,
warningClass: "badge bg-info",
limitReachedClass: "badge bg-warning"
});
// 设置提示显示的位置
$("input#placement").maxlength({
// 可使用的值有: bottom, left, top, right, bottom-right, top-right, top-left, bottom-left 和 centered-right。
// 你也可以使用 : bottom-right-inside, top-right-inside, top-left-inside and bottom-left-inside.
alwaysShow: true,
placement: "top-right-inside",
warningClass: "badge bg-info",
limitReachedClass: "badge bg-warning"
})
// 始终显示
$("input#alloptions").maxlength({
showOnReady: true,
warningClass: "badge bg-success",
limitReachedClass: "badge bg-danger",
separator: " 个字符; ",
preText: "已输入 ",
postText: " 个可用字符。",
validate: !0
});
// 文本域使用
$("textarea#textarea").maxlength({
threshold: 255,
warningClass: "badge bg-info",
limitReachedClass: "badge bg-warning"
});
});
</script>
</body>
</html>
HTML
1
https://gitee.com/StoneNBS/Light-Year-Admin-Using-Iframe-v5.git
git@gitee.com:StoneNBS/Light-Year-Admin-Using-Iframe-v5.git
StoneNBS
Light-Year-Admin-Using-Iframe-v5
Light Year Admin Using Iframe v5
master

搜索帮助

53164aa7 5694891 3bd8fe86 5694891