我想隱藏警示框。 最後一行的警報框首先彈出,之後當ajax調用完成其他警報框時,如果彈出條件,則彈出第一個警報框。如何在javascript中隱藏警示框
我想在彈出第二個提醒框時隱藏第一個提醒框。
var xmlhttp;
if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
} else {// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange=function() {
if (xmlhttp.readyState==4) {
if(xmlhttp.status==200) {
alert(getLocalizedString("partialExportFCdata_ui.msg3");
}else{
alert(getLocalizedString("partialExportFCdata_ui.msg4");
}
}
var obj = document.getElementById("ChkBoxHeader");
checkAll(false, obj.name);
}
xmlhttp.open("POST","FCTagService? htmlaction=updateTags&records="+sb.toString()+"&containsid="+containsid+"&catalogIdStr="+catalogIdStr, true);
xmlhttp.send();
alert(getLocalizedString("partialExportFCdata_ui.msg7"); //Last alert box
您不能,您無法控制關閉警報框。 相反,您可以使用燈箱,您可以根據需要顯示和隱藏燈箱。 – Vivek
這將幫助你.https://stackoverflow.com/questions/17321574/how-to-auto-close-alert-boxes –
@ user3036097有很多類似於你的問題的帖子..要求你在創建新的之前進行搜索.. –