1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 2 <html xmlns="http://www.w3.org/1999/xhtml">
 3 <head>
 4     <meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
 5     <title>test1</title>
 6 </head>
 7 <body>
 8     <div id="content">
 9         <p>This isa a <strong>paragraph</strong> with a list following it.</p>
10         <ul>
11             <li>Item 1</li>
12             <li>Item 2</li>
13             <li>Item 3</li>
14         </ul>
15     </div>
16     <script type="text/javascript" src="test1.js"></script>
17 </body>
18 </html>
1 var content = document.getElementById("content").innerText.toLowerCase();
2 console.log(content);
3 var content = document.getElementById("content");
4 content.innerHTML = "Hello world!!!";
5 console.log(content.innerText);

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-10-27
  • 2021-09-14
  • 2021-07-30
  • 2022-01-12
  • 2021-09-18
  • 2022-12-23
猜你喜欢
  • 2021-08-30
  • 2021-08-13
  • 2022-01-02
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案