日期:2014-05-16 浏览次数:20631 次
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"></script> <script type="text/javascript"> function doAction(index) { var ulObj = document.getElementById('u' + index); if (ulObj.style.display == 'none') { ulObj.style.display = 'block'; } else { ulObj.style.display = 'none'; } } $(document).ready(function () { $('#aaa').click(function () { $('#divRight').load('xxxx.php'); }); }); </script> </head> <body style="font-size: 20px; font-style: italic;"> <div id="d1v"> 首页</div> <div id="divRight"> <h1> 欢迎访问</h1> </div> <div id="divLeft"> <ul> <li onclick="doAction(1);">xxxx</li> <ul id="u1" style="display: none;"> <li><a href="#">xxx</a></li> <li onclick="doAction(3);"><a href="#">xxxx</a></li> <ul id="u3" style="display: none;"> <li><a href="#">xxxxx</a></li> <li><a href="#">xxxx</a></li> <li><a href="#">xxxxx</a></li> </ul> <li><a href="#">xxxx</a></li> <li><a href="#">xxxxx</a></li> </ul> <li onclick="doAction(2);">xxxxx</li> <ul id="u2" style="display: none;"> <li><a href="#">xxxxx</a></li> <li><a href="#">xxxxx</a></li> <li><a href='javascript:;' id='aaa'>xxxx</a></li> <li><a href="#">xxxxx</a></li> </ul> </ul> </div> </body> </html>
------解决方案--------------------