Dynamically generate span based on li
白一
白一 2019-03-25 16:52:03
0
2
1039

Dynamically generate span tags based on the number of li tags, and clicking the span tag will also display the corresponding li content

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<link rel="stylesheet" href="css/ 3.css">
</head>
<body>
<ul id="box">
<li>item0</li>
< ;li>item1</li>
<li>item2</li>
<li>item3</li>
</ul>
<div id="spans ">

</div>
</body>
<script src="js/js3.js"></script>
</ html>

白一
白一

reply all(1)
秋香姐家的小书童

Are you asking a question or taking notes?

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template