日期:2014-05-16 浏览次数:20743 次
<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <style> a { text-decoration:none;} li { list-style:none; padding:10px 0;} </style> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js"></script> <script> $(function(){ $("li a").click(function(){ var song = $(this); var songid = song.attr("id"); $.post("findsrc.php",{ id: songid,},function(data) { $("#src").remove(); song.after($('<div id="src">' + data + '</div>').fadeIn("slow")); }); // post return false; }); }); </script> </head> <body> <ul> <li><a href="#" id="1">how are you </a></li> <li><a href="#" id="2">oh yes </a></li> <li><a href="#" id="3">baby come on </a></li> </ul> </body> </html>