我有一個簡單的無序列表,即一個菜單(具有兩級子菜單)。我希望它的子菜單(和這些子菜單的子菜單)從上到下按字母順序顯示。對於菜單中的HTML代碼如下:按字母順序排列列表項
<div id="sidebar2" class="sidebar" >
<ul class="goo-collapsible goo-coll-stacked">
<li class="header">Information Systems</li>
</ul>
<div >
<div id="nav">
<ul id="navList">
<li><a href="#">Other Databases and Portals</a>
<!-- This is the sub nav -->
<ul class="listTab">
<li ><a href='http://www.icar.org.in/rohudatabase/index.php' target="_blank">Rohu Database</a></li>
<li ><a href='http://117.240.114.67/weedid/aiwsweedident.aspx' target="_blank">Weed Seed Identification</a></li>
<li ><a href='http://117.240.114.67/weedid/cwsmainweeds.aspx' target="_blank">Weed Seedling Identification</a></li>
<li ><a href='http://117.240.114.67/weedid/bwiweedident.aspx' target="_blank">Weed Identification</a></li>
<li ><a href='http://www.crida.in:8080/naip/index.jsp' target="_blank">Crop Pest DSS</a></li>
<li ><a href='http://www.cropweatheroutlook.in' target="_blank">Crop Weather Outlook: AICRPAM tools</a></li>
<li ><a href='http://www.nbfgr.res.in/Databases/formfish/index.html' target="_blank">Automated Species Identification System</a></li>
<li ><a href='http://www.nbfgr.res.in/Databases/ornamental/home.aspx' target="_blank">Marine ornamental finfishes and shell fishes</a></li>
<li ><a href='http://210.212.93.85/agris/breed.aspx' target="_blank">Animal Genetic Resources of India</a></li>
<li ><a href='http://www.ncipm.org.in/cropsap2014/login.aspx' target="_blank">Crop Pest Surveillance and Advisory</a></li>
<li ><a href='http://www.ncipm.org.in/ICTMalawi/' target="_blank">ICT Based Pest Surveillance</a></li>
<li ><a href='http://ctcri.in/statistics/FormsCEI.aspx' target="_blank">TUBER CROPS STATISTICS</a></li>
<li ><a href='http://www.crijaf.org.in/SideLinks/QuickLinks/AgrometeorologicalData.html' target="_blank">Agrometeorological Data at ICAR-CRIJA</a></li>
<li ><a href=' http://www.crida.in:8080/naip/index.jsp' target="_blank">Crop Pest DSS</a></li>
<li ><a href=' http://nrcgrapes.nic.in/weather_forecast_based_grape_adv.htm' target="_blank">Weather forecast based grape advice</a></li>
<li ><a href='http://research.ciphet.in/' target="_blank">Post-Harvest Machinery</a></li>
<li ><a href='http://cift.res.in/innercontent.php?contentid=NjA=' target="_blank">CIFT Knowledge Base</a></li>
<li ><a href='http://nrce.nic.in/breeds.php' target="_blank">Equine Breeds of India</a></li>
</ul>
</li>
<li><a href="#">Genetic Resources Portals</a>
<!-- This is the sub nav -->
<ul class="listTab">
<li ><a href='http://www.mgrportal.org.in/' target="_blank">Microbial Genetic Resources Portal</a></li>
<li ><a href='http://www.nbpgr.ernet.in/PGR_Databases.aspx' target="_blank">PGR Database</a></li>
<li ><a href='http://www.nbpgr.ernet.in:8080/PGRPortal/(S(fzkcby45lxboum2hufans255))/default.aspx' target="_blank">PGR Portal</a></li>
<li ><a href='http://210.212.93.85/agrportal/index.htm' target="_blank">Animal Genetic Resources Portal</a></li>
<li ><a href='http://www.sugarcane.res.in/index.php/en/resrch/genetic-resources' target="_blank">Sugarcane Genetic Resources</a></li>
</ul>
</li>
</div>
</div>
<div style="margin-top: 65px;">
<ul class="goo-collapsible goo-coll-stacked">
<li class="header">Latest News</li>
<marquee direction="up" style = "width:100%;margin:0px;padding:0px;" scrolldelay="200" onMouseOver="this.stop();" onMouseOut="this.start();">
<li><a href="PDF/Digitization AICRPs Information.pdf" target="_blank" >Digitization AICRPs Information</a></li>
<li><a href="PDF/Draft Format for Technology Database.pdf" >Draft Format for Technology Database</a></li>
<li><a href="PDF/ICAR Guidelines Research Papers 2014.pdf" >ICAR Guidelines Research Papers 2014</a></li>
<li><a href="PDF/Letter for Nomination of Nodal officers.pdf" >Letter for Nomination of Nodal officers</a></li>
<li><a href="PDF/Mapping of Natural Resources.pdf" >Mapping of Natural Resources</a></li>
<li><a href="JavaScript:display('Circular');" >Circular</a></li>
</marquee>
</ul>
</div>
</div>
在這裏我要進行排序,其菜單是一個與id=nav
(其餘爲標題和菜單的頁腳)的div
。
請幫助我解決這個問題。
什麼編程語言? – jdweng
html或jquery! –