핸드 오버 값 li.html
코드 사본은 다음과 같습니다.
<! doctype html>
<html xmlns = "http://www.w3.org/1999/xhtml">
<헤드>
<meta http-equiv = "content-type"content = "text/html; charset = utf-8"/>
<title> Li </title>의 가치를 바꾸십시오
<script type = "text/javaScript">
Window.onload = function () {
var lis = document.getElementById ( "ullist"). childnodes;
for (var i = 0; i <lis.length; i ++) {
var myli = lis [i];
// 태그인지 판단합니다
if (myli.nodetype == 1) {
// 아래의 LI로 위치를 전환합니다
myli.onclick = function () {
if (this.nextElementsibling) {
var nextli = this.nextelementsibling; // 이것은 myli가 아니라 여기에서만 사용할 수 있습니다.
documb
}
};
}
}
}
</스크립트>
</head>
<body>
<ul id = "ullist">
<li> 베이징 </li>
<li> Shanxi </li>
<li> 상하이 </li>
<li> Tianjin </li>
<li> Henan </li>
</ul>
</body>
</html>