<html>
<head>
<script type="text/javascript" src="http://code.jquery.com/jquery-1.8.2.min.js"></script>
<script type="text/javascript">
function test(){
alert($(this).attr('href'));
}
</script>
</head>
<body>
<a href='javascript:test();'>test</a>
</body>
</html> 最佳答案