我有一張圖像,需要在顯示特定間隔後隱藏圖像。我爲它編寫了下面的代碼。特定時間後隱藏圖像
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Untitled Document</title>
<script src="./1_files/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
$('div').delay(2000).show(0);
$('hide').delay(3000).hide(0);
});
</script>
</head>
<body>
<img id="hide" src="9.png" width="29" height="39">
</body>
</html>
圖像沒有隱藏。它不斷顯示。任何想法爲什麼?提前致謝。
也許是因爲選擇應該是'#hide'? – lonesomeday
仍然不起作用 –