如何在我的確認刪除按鈕上調用多個功能?在經典asp中按鈕點擊調用多個功能
這裏有我需要調用的函數:
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>
我打電話這樣的功能,但它不工作。
看起來你在混合客戶端和服務器端編碼。你不能那樣做。改用AJAX代替。 –