[javascript] view plain copy $(function(){ $("[id^=click_]").click( function () { var id=$(this).attr("id").split("click_")[1]; alert(id); }); }) [html] view plain copy <a href = "###" id="click_1">点击1</a><br/> <a href = "###" id="click_2">点击2</a><br/> <a href = "###" id="click_3">点击3</a><br/> <a href = "###" id="click_4">点击4</a><br/>