Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/451.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/30.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 在页面中使用加载器???没有jQuery吗?_Javascript_Html_Css_Animation_Transitions - Fatal编程技术网

Javascript 在页面中使用加载器???没有jQuery吗?

Javascript 在页面中使用加载器???没有jQuery吗?,javascript,html,css,animation,transitions,Javascript,Html,Css,Animation,Transitions,请看我的简历。我也是。大致相同:- 现在,作为对我得到的唯一评论的回应,我自己做了一些研究。我发现了一个很酷的页面:- 在阅读了该页面上的一些内容以及himanshu在评论中提到的内容后,我得到了以下信息:- HTML: <body onload=" setTimeout(work, 2000)" > <div class = circle ></div> <br> <br> <br> <br> <b

请看我的简历。我也是。大致相同:-

现在,作为对我得到的唯一评论的回应,我自己做了一些研究。我发现了一个很酷的页面:-

在阅读了该页面上的一些内容以及himanshu在评论中提到的内容后,我得到了以下信息:-

HTML:

<body onload=" setTimeout(work, 2000)" >

<div class = circle ></div>


<br>
<br>
<br>
<br>
<br>

<div id = test>
    8et 84yutreuty8e45 84 eyt84
</div>


<br>
<br>
<br>
<br>
<br>

</body>
此外,如果你能就如何继续做我在问题(上面的链接)中提到的其他事情给出一些提示,那将非常有帮助。这将使我在遇到路障时不必再问更多的问题D


注意:请不要使用jQuery。还不知道。

应该是
getElementsByClassName
而不是
getElementByClassName
。可能这就是你的错误的来源。

你的问题现在可能重复的是“我如何使用getElementByClassName?”-你问这个问题的背后原因并不特别相关。正如所指出的,它是由键入
getElementByClassName
引起的。在这里你可以看到它在工作:@thepio这在chrome中似乎不起作用???@Pranav我在使用chrome,它对我有效:o
<style type="text/css">


.circle {
    border: 5px solid red;
    border-radius: 50%;
    height: 100px;
    width: 100px;
    border-top:5px solid blue; 
    animation: rotate 2s linear infinite;
    opacity: 1;

}

.circle.awesome {
    opacity: 0;
    transition: opacity 5s;
}


@keyframes rotate {
    0%{transform:rotate(0deg);}

    100%{transform: rotate(360deg);}

}



</style>
<script type="text/javascript">

var web = document.getElementByClassName("circle")[0] ;

function work () {

     test.innerHTML = ("pppppppppppppppppppp");
     web.classList.add('awesome') ;
}



</script>
 var web = document.getElementByClassName("circle")[0] ;