点击一个 超级连接
让他 执行一个 js 的函数  
这个 怎么做

解决方案 »

  1.   

    <!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=gb2312" />
    <title>无标题文档</title>
    <script type="text/javascript">
    function show(){
    alert("aaa");
    }
    </script>
    </head><body>
    <a href="#" onclick="show()">dddd</a>
    </body>
    </html>
      

  2.   

    <a href="javascript:function()"></a>  此处的function就是就是你写的js函数。
      

  3.   

    <a href="javascript:functionName()"> </a>
    <a href="#" onclick="javascript:functionName()"> </a>#就是这个连接什么也不干,如果你有地址,放上你的地址就可以了