El valor de la entrega li.html
La copia del código es la siguiente:
<! Doctype html>
<html xmlns = "http://www.w3.org/1999/xhtml">
<Evista>
<meta http-equiv = "content-type" content = "text/html; charset = utf-8"/>
<title> intercambie el valor de li </title>
<script type = "text/javaScript">
window.onload = function () {
var lis = document.getElementById ("Ullist").
para (var i = 0; i <lis.length; i ++) {
var myli = lis [i];
// juzga si es una etiqueta
if (myli.nodeType == 1) {
// Cambiar ubicación con un Li a continuación
myli.onclick = function () {
if (this.nextelementible) {
var nextli = this.nextelementible; // Esto solo se puede usar aquí, no myli
document.getElementById ("Ullist"). InsertBefore (NextLi, esto);
}
};
}
}
}
</script>
</ablo>
<Body>
<ul id = "Ullist">
<li> Beijing </li>
<li> shanxi </li>
<li> Shanghai </li>
<li> Tianjin </li>
<li> Henan </li>
</ul>
</body>
</html>