时间:2021-07-01 10:21:17 帮助过:97人阅读
<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' onclick='changeText()' value='Change Text'/>
更多js innerHTML 改变div内容的方法相关文章请关注PHP中文网!