日期:2014-05-16  浏览次数:20393 次

javascript 操作 div <h3>标记
javascript   如何改变 <h3>   标记里的文字
例如
<div   class= "testdiv ">
      <h3   id= "testh3 ">
            如何改变我
      </h3>
</div>


------解决方案--------------------
<script type= "text/javascript " src= "http://code.jquery.com/jquery-latest.pack.js "> </script>
<script type= "text/javascript " language= "JavaScript ">
$(document).ready(function(){
$( ".testdiv/h3 ").html( '就是改变你 ');
});
</script>
<div class= "testdiv ">
<h3 id= "testh3 ">
如何改变我
</h3>
</div>
------解决方案--------------------
<div class= "testdiv ">
<h3 id= "testh3 ">
如何改变我
</h3>
</div>

<SCRIPT LANGUAGE= "JavaScript ">
<!--
var testh3 = document.getElementById( "testh3 ");
testh3.innerHTML = "这样改变你 ";
//-->
</SCRIPT>
------解决方案--------------------
ding!