代码:<a href="" onclick="javascript:window.alert('asda')">Test</a>,这是一个hyperlink,我想点击它的时候只执行javascript,为不想它打开新页面,如何做到? <a href='javascript:window.alert("asda")'> 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 or<a href="javascript:window.alert('asda')"> 方法一:利用锚的方式<a href="#" onClick="javascript:alert('hello');">hello</a>方法二:利用CSS方式模拟<a style="text-decoration:underline; cursor:hand" onClick="javascript:alert('hello');">hello</a> 就用sdtashenjie(sdtashenjie) 说的方法就可以了啦,你 可以 试试看的 用a也可以的:<a href=xxx onclick="dosomething();return false">test</a> ext的使用原理? 如题 急问小问题:js正则中是否有类似Perl的$1? 急~~为什么我在function只能用一个document输出,不能循环输出 显示不出email地址 一个添加表格的问题 日期判断的问题,请各位给个思路 那位能够给我一个关于树状菜单拖动的例子! Javascript怎样实现在本页中自动链接? js问题 button 按钮点击一次后 改变条件后无法点击无反应 这一段JS看不懂. 使用javascript对某些对象操作,例如<Table>,删了它一些行,但我想撤销javascript做的操作,除了刷新页面,有没有直接在该页面撤销它上一步或所有操作的方法呢(不刷新!)?
<a href="javascript:window.alert('asda')">
<a href="#" onClick="javascript:alert('hello');">hello</a>方法二:利用CSS方式模拟
<a style="text-decoration:underline; cursor:hand" onClick="javascript:alert('hello');">hello</a>
<a href=xxx onclick="dosomething();return false">test</a>