码迷,mamicode.com
首页 > 其他好文 > 详细

document.all("div).style.display = "none"与 等于""的区别

时间:2020-11-30 15:25:27      阅读:2      评论:0      收藏:0      [点我收藏+]

标签:loading   mod   cti   flag   verify   head   onkeyup   src   消失   

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<td class="title">
    <Div id="divApproveMofiyReasonTitle" style="display:none"> 修改原因 </Div>
    <Div id="divApproveRejectReasonTitle" style="display:none"> 拒绝原因 </Div>
</td>
<td class="input">
    <Div id="divApproveMofiyReasonInput" style="display:none"><input class="CodeNo" name="ModifyReason" verify="修改原因|Code:EdorApproveReason" ondblclick="return showCodeList(‘EdorApproveReason‘,[this,ModifyReasonName],[0,1])" onkeyup="return showCodeListKey(‘EdorApproveReason‘,[this,ModifyReasonName],[0,1])"><input class="CodeName" name="ModifyReasonName" readonly></Div>
    <Div id="divApproveRejectReasonInput" style="display:none"><input class="CodeNo" name="RejectReason" verify="拒绝原因|Code:EdorRejectReason" ondblclick="return showCodeList(‘EdorRejectReason‘,[this,RejectReasonName],[0,1])" onkeyup="return showCodeListKey(‘EdorRejectReason‘,[this,RejectReasonName],[0,1])"><input class="CodeName" name="RejectReasonName" readonly></Div>
<td class="title"><Div id="divApproveErrorChk" style="display:none"><input name="ErrorChk" type="checkbox" onclick="setErrorFlag()" >差错件</Div></td>
</td>
<script type="text/javascript">

    function afunction(){
        document.all("divApproveRejectReasonTitle").style.display = "";
        document.all("divApproveRejectReasonInput").style.display = "";
        document.all("divApproveErrorChk").style.display = "";
    }
    setInterval(afunction,1000)
    //afunction();
    function bfunction(){
        document.all("divApproveRejectReasonTitle").style.display = "none";
        document.all("divApproveRejectReasonInput").style.display = "none";
        document.all("divApproveErrorChk").style.display = "none";
    }
    //bfunction();
    setInterval(bfunction,3000);

</script>

</body>
</html>

默认加载为  style="display:none"

  经过一秒之后设置为

.style.display = "";

  显示标签,接着3秒为

.style.display = "none";
标签消失
技术图片技术图片

document.all("div).style.display = "none"与 等于""的区别

标签:loading   mod   cti   flag   verify   head   onkeyup   src   消失   

原文地址:https://www.cnblogs.com/zytcomeon/p/14032671.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!