<<body背景图片>>问题 background:url(../images/eintop_sd.jpg) repeat-x center top; padding-top:55px;这段CSS 用JS动态控制代码怎么写 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 document.body.style.background='url(../images/eintop_sd.jpg) repeat-x center top'; document.body.style.paddingTop='55px'; <!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><script type="text/javascript"> function ChangeCss() { var div = document.all.divMain; //div = document.body; //换成body即可 div.style.background = "url(1.gif) no-repeat center top"; div.style.paddingTop = "200"; }</script></head><body onload="ChangeCss();"> <form name="form1" method="post" id="form1"> <div id= "divMain" style="width:800px; height:800px; border:solid 1px black;"> ss </div> </form></body></html> 一个动态创建div导致js无故失效的问题 如何解析vCard? 计算器的问题,请教一下。 jquery新版本的天大bug 送分 超级奇怪的alert问题!(150) 如何给弹出窗口传递参数,或者如果用弹出窗口里的button给父窗口的text传递参数. 问一个简单的问题! 我在 onsubmit时,想调用两个javascript函数! 应该怎么写! window.onmove为什么不可用啊?? 二段JavaScript放在一起怎么不能同时运行 ajax为啥能实现为刷新获取数据 关于图片对象的问题 关于parent.opener的问题???????????????????????
document.body.style.background='url(../images/eintop_sd.jpg) repeat-x center top';
document.body.style.paddingTop='55px';
<!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>
<script type="text/javascript">
function ChangeCss()
{
var div = document.all.divMain;
//div = document.body; //换成body即可
div.style.background = "url(1.gif) no-repeat center top";
div.style.paddingTop = "200";
}
</script>
</head>
<body onload="ChangeCss();">
<form name="form1" method="post" id="form1">
<div id= "divMain" style="width:800px; height:800px; border:solid 1px black;">
ss
</div>
</form>
</body>
</html>