<BODY>
<a href="http://www.sina.com.cn" onclick="alert('执行一些代码')">bbbbb</a>
</BODY>

解决方案 »

  1.   

    <a href="Javascript:hh()">先执行程序再链接</a><script language="Javascript">
    function hh(){
      //这里是你要执行的程序代码;
      window.location.href="http://www.csdn.net/"  //你自己的链接地址
      }
    </script>
      

  2.   

    <a href="Javascript:hh()">先执行程序再链接</a><script language="Javascript">
    function hh(){
      //这里是你要执行的程序代码;
      window.location.href="http://www.csdn.net/"  //你自己的链接地址
      }
    </script>
      

  3.   

    <a href="" onclick="alert('现在执行你的代码!执行后会跳转到你要跳转的地址!');this.href='http://www.5inet.net';">你的连接</a>
      

  4.   

    还有一个更简单的问题
    <div id=qw onclick="javascript:"hh();return false" style="CURSOR: hand">123<div>
    能象超级链接一样加个title上去吗?
      

  5.   

    <a href="Javascript:if(doSomthing())window.location='www.csdn.net'">先执行程序再链接</a><script language="Javascript">
    function doSomthing(){
      .....
     return true;
      }
    </script>
      

  6.   

    Good !!!!!!!!!!!!!!!!!!!!!!!!!!!!!11111
      

  7.   

    先 attachEvent('onclick',doit);
    然后在 doit 函数里看 currentElement 是什么东东,如果是 a ,link 啦就去先作你自己的事。
    (具体语法我没讲究,呵呵 反正就这意思)
      

  8.   

    <a href="#" onclick="javascript:alert("do!");windows.location.replace("http://yoururl");">link</a>
    or
    <a href="#" onclick="javascript:alert("do!");windows.open("http://yoururl");">link</a>regards