<div class="htmlarea"> <textarea id="runcode33187"> <title></title> <link href="http://www.nextway.cn/attachments/month_0605/StyleSheet.css" rel="stylesheet" type="text/css"> <script language="javascript" type="text/javascript" src="http://www.nextway.cn/attachments/month_0605/TagPage.js"></script> <script language="javascript" type="text/javascript"> function crea(){ var obj = new CTagPages("maintag"); obj.add(new CTag("files","文件","content1"));//创建一个文档中不存在的内容页 obj.add(new CTag("edits","编辑","content2")); obj.add(new CTag("windows","窗口","content3")); obj.add(new CTag("helps","帮助","content4")); document.all.tag.innerHTML = obj; obj.setTag(1); obj = new CTagPages("maintag1"); obj.add(new CTag("files","文件","Div1"));//创建一个文档中不存在的内容页 obj.add(new CTag("edits","编辑","Div2")); obj.add(new CTag("windows","窗口","Div3")); obj.add(new CTag("helps","帮助","Div4")); document.all.tag1.innerHTML = obj; obj.setTag("files"); } window.onload = crea; </script> <hr> <div id="tag"></div> <div id="content1" class="content" style="background-color:Green;">我爱你中国</div> <div id="content2" class="content" style="background-color:Aqua;">爱你中国</div> <div id="content3" class="content" style="background-color:Fuchsia">中国爱你</div> <div id="content4" class="content" style="background-color:Blue">很爱你中国</div> <div id="tag1"></div> <div id="Div1" class="content" style="background-color:Green;">我爱你中国</div> <div id="Div2" class="content" style="background-color:Aqua;">爱你中国</div> <div id="Div3" class="content" style="background-color:Fuchsia">中国爱你</div> <div id="Div4" class="content" style="background-color:Blue">很爱你中国</div> </textarea><br><input onclick="runEx('runcode33187')" type="button" value="运行代码"> <input onclick="doCopy('runcode33187')" type="button" value="复制代码"> <input onclick="doSave(runcode33187)" type="button" value="保存代码">[Ctrl+A 全选 注:<a href="http://www.jb51.net/article/23421.htm" title="查看具体详情" target="_blank">如需引入外部Js需刷新才能执行</a>]</div>