我找到了一些自定义绘制的下拉框来替换 HTML select 元素的解决方案,即 jquery-image-dropdown 解决方案。
但是,我怎样才能得到一个需要点击才能打开的框,并在顶部 overdraw 所选元素,如:http://www.xero.com/
抱歉,如果这有点令人困惑,基本上我正在寻找与此类似的解决方案。
干杯。
最佳答案
您可以从 stratch 开始,并不复杂。
示例:
<html>
<script>
function ShowList()
{
document.getElementById("List").style.display = "block";
document.getElementById("ChangeLocation").style.display = "none";
}
</script>
<body>
<span id="ChangeLocation" onclick="javascript:ShowList();">Change location</span>
<ul id="List" style="display:none">
<li>Global</li>
<li>United Kingdom</li>
<li>Australia</li>
<ul>
</body>
</html>
关于javascript - 下拉 css/javascript 框,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3634746/