我目前有一个html textInput分隔符,其填充如下:-
<div class="textInput spacer">
<h2>Release #1 App Option Defaults</h2>
<textarea class="textbox" id="baseText"></textarea>
<script>
var currentBaseValue = $('#selectedBaseRelease').val();
loadbaseText(currentBaseValue);
</script>
</div>
... selectedBaseRelease的派生方式如下:-
<select id="selectedBaseRelease">
<script>
var currentBaseValue;
$("#selectedBaseRelease").load("BaseReleaseMenuNoTs.html", function() {
currentBaseValue = $(this).val();
loadbaseText(currentBaseValue);
});
</script>
</select>
...并且BaseReleaseMenuNoTs.html拥有这样的条目:-
<option value="O-2018.06/O-2018.06-SP2.AppOps.public">ICC2_O-2018.06-SP2</option>
<option value="O-2018.06/O-2018.06-SP1.AppOps.public" selected >ICC2_O-2018.06-SP1</option>
<option value="O-2018.06/O-2018.06.AppOps.public">ICC2_O-2018.06</option>
...一切正常。现在,我想用鼠标悬停单击界面替换下拉菜单。我认为这可能有用...
<nav id="main_nav">
<ul>
<li>
<a>ICC2</a>
<ul>
<li>
<a>O-2018.06</a>
<ul>
<li><a>SP1</a></li>
<li>
<a>SP1-T</a>
<ul>
<li><a>Jun 29, 2018</a></li>
<li><a>Aug 29, 2018</a></li>
<select id="selectedBaseRelease">
<script>
var currentBaseValue;
$("#selectedBaseRelease").load("O-2018.06/O-2018.06-SP2.AppOps.public", function() {
currentBaseValue = $(this).val();
loadbaseText(currentBaseValue);
});
</script>
</select>
</ul>
</li>
<li><a href="">Base</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</nav>
...但是什么也没发生。如何从悬停单击菜单界面中选择一个选项并加载引用的文件?
谢谢!
-克里斯