学习此连接的总结http://developer.51cto.com/art/201009/226158.htmcss样式表中四种属性选择器1> 简易属性 tag[class]{ font-weight:bold } It will affect all tag with any class. e.g. <h2 class="old" > or <h2 class="new">2>精确属性值 a[href="http:/…
第一种:通过text/HTML var txt1="<h1>Text.</h1>"; 第二种:通过jQuery var txt2=$("<h2></h2>").text("Text."); 第三种:通过JavaScript/DOM var txt3=document.createElement("h3");txt3.innerHTML="Text.";…