如下:file39是id,file39__attachmentids,是固定写法。
function validateAttachment() { var attachment = $("#file39__attachmentids").val(); if (attachment != undefined && attachment != '') { return true; } else { alert("请上传追回借据相关凭证,再进行该操作!"); return false; } } <tr> <td class="td_left">追回借据相关凭证:</td> <td > <%--上传附件--%> <v:attachment attachmenttype="39" id="file39" objectid="bussTwInfo.objid" projid="bussTwInfo.objid" isupload="yes" isdelete="yes" /> </td>
</tr>