87,901
社区成员
发帖
与我相关
我的任务
分享
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<ul id='test'>
<li>1</li>
<li>1</li>
<li>1</li>
</ul>
<ol id='test2'></ol>
<script>
document.getElementById('test').onclick=function(e){
var a=e||window.event,
ul2=document.getElementById('test2'),
src=a.target||a.srcElement;
if(src.tagName.toLowerCase()=='li'){
ul2.appendChild(src);
}
}
</script>
</body>
</html>