<a href='javascript:window.alert("asda")'>

解决方案 »

  1.   

    or
    <a href="javascript:window.alert('asda')">
      

  2.   

    方法一:利用锚的方式
    <a href="#" onClick="javascript:alert('hello');">hello</a>方法二:利用CSS方式模拟
    <a style="text-decoration:underline; cursor:hand" onClick="javascript:alert('hello');">hello</a>
      

  3.   

    就用sdtashenjie(sdtashenjie) 说的方法就可以了啦,你 可以 试试看的
      

  4.   

    用a也可以的:
    <a href=xxx onclick="dosomething();return false">test</a>