额..请问这个为什么显示不了元素的... var dd = document.createElement("div"); dd.id = "selectorArea"; dd.width = 400 + "px"; dd.height = 400 + "px"; dd.style.backgroundColor = "Blue"; document.body.appendChild(dd); 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 L@_@K var dd = document.createElement("div"); dd.id = "selectorArea"; dd.style.width = 400 + "px"; dd.style.height = 400 + "px"; dd.style.backgroundColor = "Blue"; document.body.appendChild(dd); 还可以这么写L@_@K var dd = document.createElement("div"); dd.id = "selectorArea"; with(dd.style) { width = 400 + "px"; height = 400 + "px"; backgroundColor = "Blue"; } document.body.appendChild(dd);Web 开发常用手册DHTML 参考手册http://download.csdn.net/source/308913JScript 语言参考http://download.csdn.net/source/308916CCS 样式表中文手册http://download.csdn.net/source/304124 1加到100的另一种实现方式!! JS 构造函数,原型问题 HiddenField控件的值如何获得 请问用什么方式修改以下程序,子母窗口传值,IE及Firefox同样可用 问一个用正则表达式作替换的问题,请大家过来帮帮忙 高分请问怎样得到窗口或者表格的高度和宽度?????? 菜鸟问题java?在线求帮助! 如何使主页更新后可自动通知网友 js上一周下一周和跨月问题 CSDN论坛文章中[引用]这按钮的JS有案例可参考下吗? 谁能帮我把这段代码改成放在任意文件里都可以用? jquery可以根据innerText选择的吗?
var dd = document.createElement("div");
dd.id = "selectorArea";
dd.style.width = 400 + "px";
dd.style.height = 400 + "px";
dd.style.backgroundColor = "Blue"; document.body.appendChild(dd);
var dd = document.createElement("div");
dd.id = "selectorArea";
with(dd.style) {
width = 400 + "px";
height = 400 + "px";
backgroundColor = "Blue";
}
document.body.appendChild(dd);Web 开发常用手册DHTML 参考手册
http://download.csdn.net/source/308913JScript 语言参考
http://download.csdn.net/source/308916CCS 样式表中文手册
http://download.csdn.net/source/304124