<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">
<title></title>
<style type= "Text/css" >
. textitem {Background-color:yellow;}
</style>
<script src= "Scripts/jquery-1.4.2.js" type= "Text/javascript" ></script>
<script type= "Text/javascript" >
$ (function () {
var link = $ ("<a href= ' http://www.baidu.com ' > Baidu </a>");
$ ("Div:first"). Append (link);
});
$ (function () {
var data = {"Baidu": "Http://www.baidu.com", "Sina": "Http://www.sina.com"};
$.each (data, function (key, value) {
var tr = $ ("<tr><td>" + key + "</td><td><a href=" + value + ">" + key + "</A></TD&G T;</tr> ");
$ ("#tableSites"). Append (tr);
});
});
$ (function () {
$ ("#removeUL"). Click (function () {
$ ("ul Li.textitem"). Remove ();
});
});
</script>
<body>
<div>
</div>
<table id= "Tablesites" >
</table>
<ul>
<li>abc</li>
<li class= "Textitem" >def</li>
<li>ghi</li>
<li class= "Textitem" >abc</li>
<li>lmn</li>
</ul>
<input type= "button" value= "Remove part of UL" id= "Removeul"/>
</body>
jquery Dynamic Creation Node