我想在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里边的代码啊?