根据不同情况,javascript有两种方法可以添加a标签:
使用innerHTML将某个元素的内容填充为a标签
首先用createElement("a")创建a标签节点,然后用appendChild()追加到一个已存在的元素
下面实例演示用第二种方法——在指定单元格内添加标签:
1、HTML结构
1 | 2 |
3 | 4 |
标题栏的“Powered by phpwind”的文件路径是:../theme/site/51php/template/common/head.htm 底部的修改文件路径是:模板底部文件footer.htm(路径:../theme/site/51php/template/common/footer.htm)