<html>
<BODY>
<SCRIPT LANGUAGE="JavaScript">
<!--
var A = document.createElement("A");
A.setAttribute("href","#");
A.appendChild(document.createTextNode("link"));
document.getElementsByTagName("BODY")[0].appendChild(A);
//-->
</SCRIPT>
</BODY>
</html>
===========================================================
<html>
<meta http-equiv="Content-Language" c>
<head>
<title></title>
</head>
<body>
<SCRIPT LANGUAGE="JavaScript">
oImage=document.createElement("IMG")
oImage.src="e:/web/net/images/toqq.gif"
document.body.appendChild(oImage)</SCRIPT>
<form id="Form1" runat="server" >
</form>
</body>
</html>
=============================
<HTML>
<HEAD>
<SCRIPT>
function createRadioButton(){
// Create radio button object with value="First Choice" and then insert
// this element into the document hierarchy.
var newRadioButton = document.createElement("<INPUT TYPE='RADIO' NAME='RADIOTEST' VALUE='First Choice'>")
document.body.insertBefore(newRadioButton);
// Create radio button object with value="Second Choice" and then insert
// this element into the document hierarchy.
newRadioButton = document.createElement("<INPUT TYPE='RADIO' NAME='RADIOTEST' VALUE='Second Choice'>")
document.body.insertBefore(newRadioButton);
}
</SCRIPT>
</HEAD>
<BODY>
<INPUT TYPE="BUTTON" ONCLICK="createRadioButton()" VALUE="Create two Radio Buttons"><BR>
<INPUT TYPE="BUTTON" ONCLICK="alert ( document.body.outerHTML )" VALUE="Click here to see HTML">
<BODY>
</HTML>
====================================================
var Rash=true;
var msg="";
function norash()
{
if (confirm("确定要取消吗"))
Rash=false;
}
function rashit()
{
setInterval('getrss()',Inttime);
}
function getrss()
{
if (Rash==true)
{
head=document.getElementsByTagName('head').item(0);
script=document.createElement('script');
script.src='INCLUDE/AutoUpdate.asp';
script.type='text/javascript';
script.defer=true;
void(head.appendChild(script));
window.status=msg;
}
}
rashit();
========================================
var mydiv=document.createElement("div");//创建一个元素.
mydiv.setAttribute("id","macnie");//赋值给这个元素一个ID。
a1.removeNode(true) //删除这个元素.