choicesjs标签输入30种场景用法示例代码
代码语言:html
所属分类:表单美化
代码描述:choicesjs标签输入30种场景用法示例代码
下面为部分代码预览,完整代码请点击下载或在bfwstudio webide中打开
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no" />
<link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/choices.base.css">
<link type="text/css" rel="stylesheet" href="//repo.bfw.wiki/bfwrepo/css/choices.9.0.1.css">
<script type="text/javascript" src="//repo.bfw.wiki/bfwrepo/js/choices.9.0.1.js"></script>
</head>
<body>
<div class="container">
<div class="section">
<h2>Text inputs</h2>
<label for="choices-text-remove-button">Limited to 5 values with remove button</label
>
<input
class="form-control"
id="choices-text-remove-button"
type="text"
value="preset-1,preset-2"
placeholder="Enter something"
/>
<label for="choices-text-unique-values"
>Unique values only, no pasting</label
>
<input
class="form-control"
id="choices-text-unique-values"
type="text"
value="preset-1, preset-2"
placeholder="This is a placeholder"
class="custom class"
/>
<label for="choices-text-email-filter">Email addresses only</label>
<input class="form-control" id="choices-text-email-filter" type="text" placeholder="This is a placeholder" />
<label for="choices-text-disabled">Disabled</label>
<input class="form-control" id="choices-text-disabled" type="text" value="josh@joshuajohnson.co.uk, joe@bloggs.co.uk" placeholder="This is a placeholder" />
<label for="choices-text-prepend-append-value">Prepends and appends a value to each items return value</label
>
<input
class="form-control"
id="choices-text-prepend-append-value"
type="text"
value="preset-1, preset-2"
placeholder="This is a placeholder"
/>
<label for="choices-text-preset-values"
>Preset values passed through options</label
>
<input
class="form-control"
id="choices-text-preset-values"
type="text"
value="Michael Smith"
placeholder="This is a placeholder"
/>
<label for="choices-text-i18n">I18N labels</label>
<input class="form-control" id="choices-text-i18n" type="text" />
<label for="choices-text-rtl">Right-to-left</label>
<input data-trigger class="form-control" id="choices-text-rtl" type="text" value="Value 1, Value 2" dir="rtl" />
<hr />
<h2>Multiple select input</h2>
<label for="choices-multiple-default">Default</label>
<select class="form-control" data-trigger name="choices-multiple-default" id="choices-multiple-default" placeholder="This is a placeholder" multiple>
<option value="Choice 1" selected>Choice 1</option>
<option value="Choice 2">Choice 2</option>
<option value="Choice 3">Choice 3</option>
<option value="Choice 4" disabled>Choice 4</option>
</select>
<label for="choices-multiple-remove-button">With remove button</label>
<select class="form-control" name="choices-multiple-remove-button" id="choices-multiple-remove-button" placeholder="This is a placeholder" multiple>
<option value="Choice 1" selected>Choice 1</option>
<option value="Choice 2">Choice 2</option>
<option value="Choice 3">Choice 3</option>
<option value="Choice 4">Choice 4</option>
</select>
<label for="choices-multiple-groups">Option groups</label>
<select class="form-control" name="choices-multiple-groups" id="choices-multiple-groups" placeholder="This is a placeholder" multiple>
<option value="">Choose a city</option>
<optgroup label="UK">
<option value="London">London</option>
<option value="Manchester">Manchester</option>
<option value="Liverpool">Liverpool</option>
</optgroup>
<optgroup label="FR">
<option value="Paris">Paris</option>
<option value="Lyon">Lyon</option>
<option value="Marseille">Marseille</option>
</optgroup>
<optgroup label="DE" disabled>
<option value="Hamburg">Hamburg</option>
<option value="Munich">Munich</option>
<option value="Berlin">Berlin</option>
</optgroup>
<optgroup la.........完整代码请登录后点击上方下载按钮下载查看
















网友评论0