日期:2014-05-16 浏览次数:20467 次
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title></title> <script src="http://www.liuxiaofan.com/demo/js/jquery-1.6.4.min.js" type="text/javascript"></script> </head> <body> <ul id="Comment"> <li> 2010/2/3 0:00:00:luolin1223 <a id="delete" href=""> 删除</a> </li> <li> 2010/2/3 0:00:00:luolin1223 <a id="delete" href=""> 删除</a> </li> <li> 2010/2/3 0:00:00:luolin1223 <a id="delete" href=""> 删除</a> </li> <li> 2010/2/3 0:00:00:luolin1223 <a id="delete" href=""> 删除</a> </li> </ul> <script> $("#Comment li a[id='delete']").click(function (e) { e.preventDefault(); alert("23"); }); </script> </body> </html>
------解决方案--------------------