close

教學網:http://www.tizag.com/javascriptT/javascript-innerHTML.php

 

<script type="text/javascript">
function changeText(){
document.getElementById('boldStuff').innerHTML = 'Fred Flinstone';
}
</script>
<p>Welcome to the site <b id='boldStuff'>dude</b> </p>
<input type='button' value='Change Text' onclick='changeText()' />

arrow
arrow
    全站熱搜

    mosquitoyo 發表在 痞客邦 留言(0) 人氣()