阻止a標籤的默認事件:
<a href="javascript:void(0)"></a>, 達到效果原頁面不刷新。
通過a標籤觸發事件跳轉:
<a href="#" ng-click="show()" target="view_window" style="text-decoration:underline;"></a>
達到效果新開一個窗口實現show方法執行的內容,可以是ajax跳轉的頁面也可以是直接跳轉的頁面。
其他target屬性值說明:
_blank | 在新窗口中打開被鏈接文檔。 |
_parent | 在父框架集中打開被鏈接文檔。 |
_self | 默認。在相同的框架中打開被鏈接文檔。 |
_top | 在整個窗口中打開被鏈接文檔。 |
framename | 在指定的框架中打開被鏈接文檔。 |