HTML:
<a type="submit" onclick="javascript:yourFunctionName();" name"save-continue-to-review" data-toggle="modal" data-target="#dialog" href="" class="btn primary btn-primary" title="Go">Go
JS:
function yourFunctionName(){
var account_owner = document.getElementById(id_account_owner).value;
var account_no = document.getElementById(id_account_number).value;
if(account_no == '' || account_owner == ''){
alert('Alert!');
}
}
如果出现这种情况如何创建:
if(account_no == '' || account_owner == ''){
alert('Alert!');
}
data-toggle="modal"
然后从我的删除a type="submit"
或更改为不同的值(例如: data-toggle="x" ?