1. &nbsp :空格 

  2. &gt:大于号 > 

  3.  &It :小于号 < 

  4.  &quot :引号” 

  5.  &copy:”版权符号 @ 

 

二、HTML 新增属性

1、contentEditable

规定是否可编辑元素的内容
属性值:
true -----可以编辑元素的内容
false -----无法编辑元素的内容
inherit -----继承父元素的contenteditable属性
当为空字符串时,效果和true一致。
当一个元素的contenteditable状态为true(contenteditable属性为空字符串,或为true,或为inherit且其父元素状态为true)时,意味着该元素是可编辑的。否则,该元素不可编辑。

document.body.contentEditable=true; 可以修改已发布网站

 

<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title>contentEditable属性</title>
    </head>
    <body>
        <h2>contentEditable属性</h2>
        <div contenteditable="true">
            Hello contentEditable
        </div>
    </body>
</html>
View Code

相关文章:

  • 2021-09-27
  • 2022-12-23
  • 2022-12-23
  • 2021-12-13
  • 2022-12-23
  • 2021-10-12
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-04-29
  • 2021-12-24
  • 2021-08-07
  • 2021-12-13
  • 2021-12-30
相关资源
相似解决方案