js 隐藏标签 获取id 标签选择器

技术文章1年前 (2024)发布 gyx131
207 0 0
document.getElementById(‘wjgs’).innerHTML = str;                       获取id
style=”display:none;”         隐藏标签
<script type=”text/javascript”>
//定时器 异步运行
document.getElementById(“bingdouplayer”).style.display=”none”; //隐藏
function hello() {
document.getElementById(‘play’).remove();
document.getElementById(“bingdouplayer”).style.display=””; //显示
}
//使用方法名字执行方法
var t1 = window.setTimeout(hello, 1000);
var t2 = window.setTimeout(“hello()”, 8000); //使用字符串执行方法
window.clearTimeout(t1); //去掉定时器
</script>
© 版权声明

相关文章

暂无评论

暂无评论...