嗨,伙计们,在php或javascript中有没有一种方法,每当我加载一个页面时。标题属性(注释)将始终显示,然后在2-3秒后消失
示例;
<html>
<head>
<title>Untitled</title>
</head>
<body>
<img src='images/test.jpg' title="This is what im saying"></img>
</body>
</html>
发布于 2014-09-12 13:20:01
使用下面这样的东西..
<html>
<head>
<title>Untitled</title>
</head>
<body>
<img src='images/test.jpg' id="imageID" title="This is what im saying"></img>
</body>
</html>
<script src="//code.jquery.com/jquery-1.11.0.min.js"></script>
<script>
$(document).ready(function(){
setTimeout(function(){ $('#imageID').attr('title','');}, 3000);
})
</script>
https://stackoverflow.com/questions/25801178
复制相似问题