87,907
社区成员
发帖
与我相关
我的任务
分享
<!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>
document.body.style.background='url(../images/eintop_sd.jpg) repeat-x center top';
document.body.style.paddingTop='55px';