转自:
http://www.renwen.net/Article_Show.asp?ArticleID=578
<html>
<head>
<title>DHtml举例12</title>
<style>
body {font-family:"宋体";color="blue";font-size="9pt"}
</style>
<script language="Javascript">
function changeText()
{
DT.innerText="我很好!";
}//function
function changeHtml()
{
DH.innerHTML="<i><u>我姓贵!</u></i>";
}//function
function back()
{
DT.innerText="您好吗?";
DH.innerHTML="您姓什么?";
}
</script>
</head>
<body>
<p><font color="gray">请点击下边的文字……</font>
<ul>
<li id="DT" Onclick="changeText()">您好吗? </li>
<li id="DH" Onclick="changeHtml()">您姓什么? </li>
<li Onclick="back()">恢复原样! </li>
</ul>
</body>
</html>