

























1.document.createElement
动态创建HTML对象
<script language="javascript">
var o = document.body;
//创建链接
function createA(url,text)
{
var a = document.createElement("a");
a.href = url;
a.innerHTML = text;
a.style.color = "red";
o.appendChild(a);
}
createA("http://www.jz123.cn/","中国建站之家");
</script>
2.With
为一个或一组语句指定默认对象。
with(dv.style){
position = "absolute";
left = "0px";
top = "0px";
width ="100%";
height ="100%";
}
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。