<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<script type="text/javascript">
window.onload=function(){
var divobj=document.createElement("div");
divobj.style.width="200px";
divobj.style.height="200px";
divobj.style.backgroundColor="red";
document.body.appendChild(divobj);
}
</script>
</head>
<body>
</body>
</html>
动态给页面上添加div.html
最新推荐文章于 2021-09-11 12:27:01 发布