如何在下拉值选择中显示内容? [英] How to visible content on dropdown value selection?
本文介绍了如何在下拉值选择中显示内容?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
为了提高知名度
And for visibility
<script>
$(function(){
$("#Alert").click(function(){
$('#AlertsTable').show();
});
});
现在我已经修改了这个
Now I have Modified into this
<select id="myDropdown" width="200" size="2">
<option value="Alert" id="Alert" selected="selected">Alert</option>
<option value="IR">IR</option>
<option value="Site">Site</option>
<option value="Devices">Devices</option>
</select>
我尝试过:
起初我把这样的值设为
What I have tried:
At first I had put values like this
<div id="myDropdown" class="dropdown-content">
<a value="Alert" type="button" class="btn btn-lg btn-default" href="#">Alert</a>
<a value="IR" type="button" class="btn btn-lg btn-default" href="#">Incident Report</a>
<a value="Site" type="button" class="btn btn-lg btn-default" href="#">Site</a>
<a value="Devices" type="button" class="btn btn-lg btn-default" href="#">Devices</a>
</div>
推荐答案
(function(){
(function(){
( #Alert)。点击(function(){
("#Alert").click(function(){
('#AlertsTable')。show();
});
} );
('#AlertsTable').show(); }); });
现在我修改了这个
Now I have Modified into this
<select id="myDropdown" width="200" size="2">
<option value="Alert" id="Alert" selected="selected">Alert</option>
<option value="IR">IR</option>
<option value="Site">Site</option>
<option value="Devices">Devices</option>
</select>
我尝试过:
起初我把这样的值设为
What I have tried:
At first I had put values like this
<div id="myDropdown" class="dropdown-content">
<a value="Alert" type="button" class="btn btn-lg btn-default" href="#">Alert</a>
<a value="IR" type="button" class="btn btn-lg btn-default" href="#">Incident Report</a>
<a value="Site" type="button" class="btn btn-lg btn-default" href="#">Site</a>
<a value="Devices" type="button" class="btn btn-lg btn-default" href="#">Devices</a>
</div>
这篇关于如何在下拉值选择中显示内容?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文