像这样,我为了突出人名,求教一下对,使用div去模似。
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title> New Document </title>
<meta name="Generator" content="EditPlus">
<meta name="Author" content="">
<meta name="Keywords" content="">
<meta name="Description" content="">
</head>
<body>
<div id="tt" contenteditable="true"></div>
<script>
document.getElementById("tt").innerHTML = "<font color='red'>hello</font>说:<font color='blue' size=20>你好</font>";
</script>
</body>
</html>
使用div!!