-1
我想關閉div而不是隱藏。 我使用此代碼追加DIV與id.Now我想刪除一個一個,我想使用jQuery刪除DIV ID我們如何在javascript中關閉div
function Attach_oneDiv(cls_r)
{
var call_id=document.getElementById('hidden_div').value;
var r=parseInt(call_id)+1;
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 && xmlhttp.status==200)
{
var NewDiv=xmlhttp.responseText;
$("#continue_field").append(NewDiv);
document.getElementById('hidden_div').value=r;
//document.getElementById('_AttachMore').style.display='block';
}
}
xmlhttp.open("GET","http://www.xyz.co.in/ajax.php?cls_r="+r,true);
xmlhttp.send();
}
var elem = document.getElementById(「myDiv」); elem.parentNode.removeChild(elem);'?? –