Javascript Basics Tutorial: DOM and HTML

Change html content

innerHTML

Let’s write it below An example, the code is as follows:

     
php 中文网

As in the above code, first we get the element node through the id, then change the value and assign it to the variable test, and then output

Change html attributes, the code is as follows

     


Continuing Learning
||
php 中文网
submit Reset Code
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!