第一段:
<textarea name="t" rows="20" cols="50"></textarea>
<script language="JavaScript">
var oTable = document.createElement("TABLE");
var oTBody = document.createElement("TBODY");
var oTR = document.createElement("TR");
var oTD = document.createElement("TD");
oTD.innerText = '无忧脚本';
oTR.appendChild(oTD);
oTBody.appendChild(oTR);
oTable.border = 1;
oTable.appendChild(oTBody);
t.appendChild(oTable);
</script>
第二段:
<textarea id="test" rows="20" cols="50"></textarea>
<Script Language="JavaScript">
var oImg=document.createElement("IMG");
oImg.src="http://www.2yup.com/asp/images/asp_logo1.gif";
test.appendChild(oImg);
</Script>
[/color] 第三段:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>New Page 1</title>
</head>
<body>
<form name="form1">
<textarea name="t" rows="20" cols="50"></textarea>
<table id=otd border=1 cellspacing=1 width=68%><tr><td width=50%>11</td><td width=50%>12</td></tr><tr><td width=50%>21</td><td width=50%>22</td></tr></table>
<script language="JavaScript">
document.form1.t.appendChild(otd);
</script>
</form>
</body>
</html>
第四段:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<title>New Page 1</title>
</head>
<body>
<form name="form1">
<textarea name="t" rows="20" cols="50"></textarea>
<script language="JavaScript">
var oTable = document.createElement("TABLE");
var oTBody = document.createElement("TBODY");
var oTR = document.createElement("TR");
var oTD = document.createElement("TD");
var str='<table border=1 cellspacing=1 width=68%><tr><td width=50%>11</td><td width=50%>12</td></tr><tr><td width=50%>21</td><td width=50%>22</td></tr></table>';
var otd=document.createElement(str);
oTD.innerHTML= str;
oTR.appendChild(oTD);
oTBody.appendChild(oTR);
oTable.border = 1;
oTable.appendChild(oTBody);
form1.t.appendChild(oTable);
</script>
</form>
</body>
</html>
----------------------------------------
|