復制代碼 代碼如下:
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();
}