setTimeout を使用して関数を作成し、時間内の動作を停止し、関数内に時間で非表示にするための 2 つの div があります。問題は、div を非表示にする時間を示す var time_hide にあります。変数
スクリプト :
<script>
function show(timer,timer_hide)
{
setTimeout(function()
{
$("#alert_background").hide(timer_hide);
$("#alert_window").hide(timer_hide);
}, timer);
}
show(4000,3000);
</script>
div は 3 秒で閉じる必要がありますが、この場合は機能せず、時間または var timer_hide の値が存在しないかのように非常に速く閉じます
助けてくれてありがとう、よろしく