<a href="sysformAction.do?method=showFile&id=22" οnclick="javascript:showSmallPic(this.href); return false;"></a>
1、return false作用:阻止href执行,只执行onclick事件
2、this.href作用:获取href中的值
这样就能阻止href执行而只执行onclick事件了。
<a href="sysformAction.do?method=showFile&id=22" οnclick="javascript:showSmallPic(this.href); return false;"></a>
1、return false作用:阻止href执行,只执行onclick事件
2、this.href作用:获取href中的值
这样就能阻止href执行而只执行onclick事件了。