这个问题与我之前关于在单击某个开关时更改 href-tag 的 URL 的帖子有关。 关联
我现在已经设置了一些不同的东西,因为我无法到达任何地方。href 更改现在可以工作,但我无法在下拉框中显示选定的图标和名称。
因此,例如,如果选择了“德语”,那么它应该与相应的标志图标一起显示为下拉框中的当前选择。
我的设置是错误的还是需要什么来解决这个问题?
<div id="language-selection"><div id="current-language"><span class="element-invisible">Current language:</span>
<img class="language-icon" src="http://www.euromonitor.com/medialibrary/Image/Flag_20x20_United_Kingdom.png" alt="English" title="English" /> English
</div>
<div class="element-invisible">Switch to:</div>
<ul id="other-languages">
<li class="zh-hans first"><a href="javascript:;" data-lang="Chinese" class="clickButton"><img class="language-icon" src="http://www.euromonitor.com/medialibrary/Image/Flag_20x20_China.png" alt="简体中文" title="简体中文" /> 简体中文</a></li>
<li class="en"><a href="javascript:;" data-lang="English" class="clickButton" </a> <span class="language-link"><img class="language-icon" src="http://www.euromonitor.com/medialibrary/Image/Flag_20x20_United_Kingdom.png" alt="English" title="English" />English</span></li>
<li class="de last"><a href="javascript:;" data-lang="German" class="clickButton"><img class="language-icon" src="http://www.euromonitor.com/medialibrary/Image/Flag_20x20_Germany.png" alt="German" title="German" /> German</a></li>
</ul>
</div>
<ul>
<li><a class="clickButton" href="folder1/firstLink/Languages/English/folder/index.html">Index Link</a></li>
<li><a class="clickButton" href="../folder2/secondLink/Languages/English/folder/index.html">A different Link </a></li>
<li><a class="clickButton" href="../../folder3/Languages/English/folder/index.html">Another different link</a></li>
<ul>