我有使用语义UI的选择菜单。单击菜单时,需要添加带有内容的div并创建所选菜单的类。
<div class="required field">
<h4 class="ui dividing header">Soluation Body</h4>
<div class="ui dropdown ui selection dropdown" style="max-width: 300px; margin-right: 17px;">
<i class="dropdown icon"></i>
<div class="default text">Soluation Body</div>
<dev class="menu" >
<div class="item" value="file">File Upload <span style="color: gray;">( zip )</span></div>
<div class="item" value="repository">Repository <span style="color: gray;">( github , gitlap ,...)</span></div>
<div class="item" value="list">List <span style="color: gray;">( futuers , basics )</span></div>
<div class="item" value="code">Code Editor <span style="color: gray;">( Code )</span></div>
<div class="item" value="image">Image <span style="color: gray;">( analysis || flow chart )</span></div>
</dev>
</div>
<div class="ui button">Add</div>
</div>
因此,如果我选择值为value =“ file”的元素
<div class="required field">
<input type="file" name="file-upload">
</div>
,如果再次单击并选择了同一文件
<div class="required field">
<input type="file" name="file-upload-2">
</div>
那有可能吗?