Interesting page code

<!DOCTYPE html>

<html>

<head>

<Title> interesting page code </ title>

<meta charset="utf-8">

<link href="/bootstrap/css/bootstrap.min.js" rel="stylesheet">

</head>

<body>

<div>

Our great nation will prosper, standing in the nations of the world.

</div>

<script>

var str = document.getElementsByTagName("div")[0].innerHTML.toString();

var i = 0;

setInterval(function(){

i++;

document.getElementsByTagName("div")[0].innerHTML = str.slice(0, i) + "|";

}, 100);

</script>

</body>

</html>

 

Copy the above code into a page file named index.php, so that a run will be displayed one div in the text on the screen, give it a try, very interesting yo! No database, just start the Apache on it. Can continue to beautify the page to your liking, you can also accompanied by music. Welcome friends to try, can not understand! I, am willing to learn together, and common progress.

Guess you like

Origin www.cnblogs.com/ffyylxq/p/12222757.html