input select & input unselect
input select & input unselect
input select
https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/select
https://stackoverflow.com/questions/10413704/how-to-select-value-of-input-onclick
input unselect
https://bytes.com/topic/javascript/answers/429209-how-unselect-text-input-box
if (document.selection)
document.selection.empty();
else if (window.getSelection)
window.getSelection().removeAllRanges();
}
html select
https://www.w3docs.com/learn-html/html-select-tag.html
<select>
<option value="books">Books</option>
<option value="html">HTML</option>
<option value="css">CSS</option>
<option value="php">PHP</option>
<option value="js">JavaScript</option>
</select>
<select aria-label="Books nad Snippets">
<optgroup label="Books">
<option value="html">HTML</option>
<option value="css">CSS</option>
</optgroup>
<optgroup label="Snippets">
<option value="git">Git</option>
<option value="java">Java</option>
</optgroup>
</select>
<input type = "text" list = "airports" name="airports">
<datalist id = "airports">
<option value = "Berlin">
<option value = "Los Angeles">
<option value = "Moscow">
<option value = "Paris">
</datalist>
https://www.w3schools.com/tags/tag_select.asp
<label for="cars">Choose a car:</label>
<select id="cars">
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
<option value="mercedes">Mercedes</option>
<option value="audi">Audi</option>
</select>
multi select bug
<label for="cars">Choose cars:</label>
<select id="cars" multiple>
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
<option value="opel">Opel</option>
<option value="audi">Audi</option>
</select>
https://element.eleme.io/#/zh-CN/component/select#ji-chu-duo-xuan
refs
©xgqfrms 2012-2020
www.cnblogs.com 发布文章使用:只允许注册用户才可以访问!
本文首发于博客园,作者:xgqfrms,原文链接:https://www.cnblogs.com/xgqfrms/p/10298333.html
未经授权禁止转载,违者必究!