HTML网页怎么在a标签里引入JS代码实现弹窗的效果

我想在a标签里边引用下边这段JS代码,不大会写,怎么修改啊(不用button标签)
<html>
<head>
<script type="text/javascript">
 $(document).ready(function() {
    
    $("#login").click(function(){
        $.XYTipsWindow({
            ___title:"登录",
            ___content:"iframe:login.html",
            ___width:"460",
            ___height:"150",
            ___showbg:true,
            ___drag:"___boxTitle"

        });
    });
    
    $("#reg").click(function(){
        $.XYTipsWindow({
            ___title:"注册",
            ___content:"iframe:reg.html",
            ___width:"460",
            ___height:"450",
            ___showbg:true,
            ___drag:"___boxTitle"
        });
    });
 })
 </script>
</head>

<body>
<div class="toolbar">
   <a href="reg.html" id="reg" class="toolbar-item toolbar-item-feedback"></a> 
   <a href="login.html" id="login" class="toolbar-item toolbar-item-app"></a>
</div>
</body>
</html>
效果参见:
jQuery实现注册和登录弹出层效果 jQuery实现注册和登录弹出层效果 https://sc.chinaz.com/jiaobendemo.aspx?downloadid=1251223191511

怎么用a标签替代按钮实现弹窗,还是需要修改下jq里边的代码啊?

把a标签的href改成javascript:;如果要跳转,就在点击事件下面加个window.location.href


<a href="javascript:;" id="reg" class="toolbar-item toolbar-item-feedback"></a> 
   <a href="javascript:;" id="login" class="toolbar-item toolbar-item-app"></a>

目测写的没毛病啊,已经给2个A标签绑定事件了,是不是没引入jquery.js?