<button id="btn_register" type="submit" style="width: 325px; height: 45px;background:#398bd7;border: none;">
<font style="font-size: 20px;color: #fff;">立即注册</font>
</button>
我是小白啦
$('#btn_register').click(function(){
if($.trim($('username').val()) == ''){
alert('请输入用户名')
}
})
<button id="btn_register">
<font>立即注册</font>
</button>
点了注册始终没弹窗。。谢谢各位大神