如何在我的确认删除按钮上调用多个函数?
以下是我需要调用的函数:
function ifnull() {
if (selected_devices_area = "") {
window.alert("Please select devices!");
}
}
function submitForm() {
if (confirm("Do you really want to delete these devices?")) {
//document.location.href = '/site/service/device/DeleteMultipleDevices.asp?siteId=<%=iSiteId%>&serviceId=<%=iServiceId%>';
document.device.submit();
window.alert('Devices successfully deleted.');
}
按钮的 HTML:
<tr>
<td><a href="/site/service/serviceinfo_main.asp?siteId=<%=iSiteId%> &crType=Delete Multiple Devices&addCr=yes&crId=<%=iCrId %>"class="btnLink">« Back</a></td>
<td class="tdRight"><a href="javascript:ifnull();javascript:submitForm();" class="btnLink">Confirm Deletion »</a></td>
</tr>
</table>
我正在调用这样的函数,但它不起作用。