jquery代码中弹出confirm确认框,代码:
function checkInput(objectSource) {
if(objectSource.onclick){
objectSource.oldOnClick = objectSource.onclick;
objectSource.onclick = null;
}
var attachfile = $('#attachment').val();
if(content.indexOf("附件") != -1 && attachfile == undefined) {
if(!confirm( '不要忘记添加附件哦。')){
return false;
}
}
objectSource.oldOnClick();
}