资料
表格
制度
合同
管理
职场
经营
创业
范文
总结
计划
作文
文章
美文
词句
教程
模板
图片
字体
图标
办公
人事
财务
生产
管理资源吧首页
>>>
教程
>>>
编程
>>>
JavaScript教程
>>>
实例学习Javascript之构建方法、属性
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title></title> <link href="http://www.nextway.cn/attachments/month_0605/StyleSheet.css" rel="stylesheet" type="text/css" /> <img src="/_New/_cj/myeditor/sysimage/space.gif" class="ewebeditor__script" _ewebeditor_fake_tag="script" _ewebeditor_fake_value="%3Cscript%20language%3D%22javascript%22%20type%3D%22text%2Fjavascript%22%20src%3D%22http%3A%2F%2Fwww.nextway.cn%2Fattachments%2Fmonth_0605%2FTagPage.js%22%3E%3C%2Fscript%3E"> <img src="/_New/_cj/myeditor/sysimage/space.gif" class="ewebeditor__script" _ewebeditor_fake_tag="script" _ewebeditor_fake_value="%3Cscript%20language%3D%22javascript%22%20type%3D%22text%2Fjavascript%22%3E%20%0D%0A%20%20%20%20%20%20%20%20function%20crea()%7B%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20var%20obj%20%3D%20new%20CTagPages(%22maintag%22)%3B%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20obj.add(new%20CTag(%22files%22%2C%22%E6%96%87%E4%BB%B6%22%2C%22content1%22))%3B%2F%2F%E5%88%9B%E5%BB%BA%E4%B8%80%E4%B8%AA%E6%96%87%E6%A1%A3%E4%B8%AD%E4%B8%8D%E5%AD%98%E5%9C%A8%E7%9A%84%E5%86%85%E5%AE%B9%E9%A1%B5%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20obj.add(new%20CTag(%22edits%22%2C%22%E7%BC%96%E8%BE%91%22%2C%22content2%22))%3B%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20obj.add(new%20CTag(%22windows%22%2C%22%E7%AA%97%E5%8F%A3%22%2C%22content3%22))%3B%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20obj.add(new%20CTag(%22helps%22%2C%22%E5%B8%AE%E5%8A%A9%22%2C%22content4%22))%3B%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20document.all.tag.innerHTML%20%3D%20obj%3B%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20obj.setTag(1)%3B%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20obj%20%3D%20new%20CTagPages(%22maintag1%22)%3B%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20obj.add(new%20CTag(%22files%22%2C%22%E6%96%87%E4%BB%B6%22%2C%22Div1%22))%3B%2F%2F%E5%88%9B%E5%BB%BA%E4%B8%80%E4%B8%AA%E6%96%87%E6%A1%A3%E4%B8%AD%E4%B8%8D%E5%AD%98%E5%9C%A8%E7%9A%84%E5%86%85%E5%AE%B9%E9%A1%B5%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20obj.add(new%20CTag(%22edits%22%2C%22%E7%BC%96%E8%BE%91%22%2C%22Div2%22))%3B%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20obj.add(new%20CTag(%22windows%22%2C%22%E7%AA%97%E5%8F%A3%22%2C%22Div3%22))%3B%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20obj.add(new%20CTag(%22helps%22%2C%22%E5%B8%AE%E5%8A%A9%22%2C%22Div4%22))%3B%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20document.all.tag1.innerHTML%20%3D%20obj%3B%20%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20obj.setTag(%22files%22)%3B%20%0D%0A%20%20%20%20%20%20%20%20%7D%20%0D%0A%20%20%20%20%20%20%20%20window.onload%20%3D%20crea%3B%20%0D%0A%20%20%20%20%3C%2Fscript%3E"> </head> <body> <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> </body> </html>
[Ctrl+A 全选 注:
如需引入外部Js需刷新才能执行
]
教程首页
更多教程