JQuery 方法 is not defined
任楚娴 2016-11-21 04:24:27
<c:forEach items="${existVendorAllocation }" var ="allocation">
<tr >
<td><a href="#" title="" onclick="viewAllocationList(${allocation.allocationListId});">${allocation.allocationTitle }</a></td>
<td>${allocation.serviceName }</td>
<td>${allocation.langDescription }</td>
<td>${allocation.allocationTier }</td>
<td>${allocation.fileType }</td>
<td>${allocation.allocationStatus }</td>
<td><a href="#" onclick="editNotes(this,${allocation.allocationVendorId})">${allocation.allocationNote }</td>
<td><input class="add_btn_create_invoice" type="button" onclick="delquote(this,${allocation.allocationVendorId},${allocation.allocationListId})" /></td>
</tr>
</c:forEach>
方法:
function editNotes(this,allocationVendorId){
var newNote=this.text;
alert(newNote);
$(opt).editable({
type:'text',
name:'edit note',
model:'inline',
url:'<%=request.getContextPath()%>/rmUserDetailController.do?action=editNote',
ajaxOptions:{
dataType:'json',
data:{
allocationVendorId:allocationVendorId,
newNote:newNote
}
success:function(json){
if(json){
AlertWithId("messageInfo","edit note false!","Message","messageInfo");
}
},
},
});
}
报错:
VM3222 rmUserDetailController.do?action=getAllocationListForVender&vendorId=1639:979 Uncaught ReferenceError: editNotes is not defined(…)