如何让页面在经过几秒之后显现出我们想要的效果呢?
代码如下:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<script>
function t1() {
document.getElementsByTagName('p')[0].style.border = '1px solid red';
}
</script>
</head>
<body onload="t1();">
<img src="24.php" alt="" />
<p>this is p</p>
</body>
</html>
<?php
$im = imagecreatetruecolor(300, 300);
sleep(5);
header('content-type:image/png');
imagepng($im);
?>