0
海iam試圖將懸停在動態圖像必須顯示動態div,如果刪除鼠標div必須隱藏,如果我在圖像div上懸停後需要保留到div如果我從div中移出它必須被隱藏,我可以看到,但我沒有像預期的那樣工作,如果我在圖像div出現,如果我把鼠標放在那裏它隱藏div一次,我刪除鼠標不能使用div中的選項,如果我把鼠標放在div中,一旦我從圖像中刪除鼠標div不關閉,對於這種情況下的解決方案糟糕的英語抱歉嗎?JavaScript懸停在動態功能不工作
<img onmouseover="GoView_respond(<?php echo $print->Friend_id;?>);" onmouseout="ExitView_respond_one(<?php echo $print->Friend_id;?>);">
<div class="respond_request" style="display:none;" id="pending_req_<?php echo $print->Friend_id;?>" >
<p class="user_details" onmouseout="ExitView_respond(<?php echo $print->Friend_id;?>);">
</div>
<script>
function GoView_respond(id){
console.log('hovering');
document.getElementById("pending_req_"+id).style.display="block";
}
var cl=0;
function ExitView_respond(id){
console.log('not hovering');
if(cl!=1){
document.getElementById("pending_req_"+id).style.display="none";
}
}
</script>
非常感謝你我會盡力回覆你 –