代码如下:
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();
}
jsf
示例
confirm