js html对象通用属性总结 收藏
1:style、style.cssText及style.position,style.left等CSS样式的各个属性
如:
var section=document.createElement("div");
section.style.cssText="position:absolute; left:200;top:100;border:1 inset blue;width:400;height:400;";
section.style.background="yellow";
section.style.display="block";
section.style.zIndex=5;
几乎每个html标签对象都具有style属性,因此该属性是通用的。
2:innerHTML属性
紧承上例:
section.innerHTML="<table border='0' style='width:399;height:30'><tr><td align='right'><input type='button' value='关闭' onclick='alert(this.parentNode.parentNode.parentNode.parentNode.parentNode.id)'></td></tr></table>"
innerHTML属性也几乎是每个html标签对象所具有的属性。
3:parentNode、parentElement,childNodes、children
parentElement 获取对象层次中的父对象。
parentNode 获取文档层次中的父对象。
childNodes 获取作为指定对象直接后代的 HTML 元素和 TextNode 对象的集合。
children 获取作为对象直接
相关文档:
<table id="tableExcel" width="100%" border="1" cellspacing="0" cellpadding="0">
<tr>
<td colspan="5" align="center">html 表格导出道Excel</td>
</tr>
<tr>
<td>列标题1</td>
<td>列标题2</td>
......
Adobe发布HTML 5开发工具 基于Dreamweaver
Adobe公司在上周举行的Google I/O开发者大会上发布了面向开发者和设计师的HTML 5工具组,Adobe HTML5 Pack。
Adobe HTML5 Pack是对Adobe Dreamweaver CS5的扩展,为Adobe Creative Suite 5 用户提供了更多的创造性功能。用户可以更轻松地创建和优化其作品。
&n ......
框线制作常用代码
代码
含义
<table>...</table>
建立表格,所有的其他标记都需要在此标记中
<table width=* heigth=*></table>
设定表格宽度width和高度height,属性值可以使用点数,如:width=50,也可以使用百分比,如:width=50%。
<table bgcolor=*></ta ......