<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>无标题文档</title>
<style type="text/css">
.message{
width:200px;
height:100px;
background-color:#CCC;}
</style>
</head>
<body>
<div id="qqq"></div>
<script type="text/javascript">
var p=document.createElement("div");
p.className="ok";
var note=document.createTextNode("I love JavaScript!")
p.appendChild(note);
var qq=document.getElementById("qqq")
document.qq.appendChild(p)
</script>
</body>
</html>
添加回答
举报
0/150
提交
取消