<script type="text/javascript">
function add(e){
var container = document.getElementById('content');
var text = document.getElementById(e).innerHTML;
var newNode = document.createElement("span");
newNode.innerHTML = text;
container.appendChild(newNode);
var ui =document.getElementById(e);
ui.style.visibility="hidden";
}
</script>
</head>
<body>
<div style="border:1px #66FFFF solid;font-family:'微软雅黑'">
<h3 style="font-family:'微软雅黑'">我的爱好</h3>
<div>
<p >先从你喜欢的东西开始,让别人了解你。</p>
<div >
<p>通过单击以下标签进行选择:<a href="#" title="换一组标签" >换一下</a></p>
<div id="option">
<span id="0_杨澜" onclick="add(this.id)">杨澜</span>
<span id="0_马艳丽" onclick="add(this.id)">马艳丽</span>
</div>
</div>
<div id="content" style="width:400px;height:200px;border:2px #99CCFF solid ">
</div>
</div>
</body>
点击标签后,下面的div中增加,如何删除增加的标签呢?写不了onclick方法,求大神帮忙修改下
HUWWW